I'm building a tiny dummy app using the command line (no gradle) with just a single blank activity, no permissions, no support libraries (or any other libraries, Google Play, etc) and yet Android always prompts for these two permissions during installation:
I understand how and why permissions get merged in when other libraries are included during a build, but my app has nothing included. I've extracted and decoded the compiled AndroidManifest.xml from the resulting APK and there's no <uses-permission>
tag anywhere inside it.
According to this question, the READ_PHONE_STATE is added if no minSdkVersion
value is entered, but I have one declared in the manifest (which I can also see in the compiled manifest).
Here is the source manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dummy.testapp"
versionCode="1">
<uses-sdk minSdkVersion="20" targetSdkVersion="22" />
<application
android:label="TestApp No Perms"
android:icon="@drawable/ic_launcher">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The single activity (MainActivity) just calls setContentView()
on a blank layout.
Can anyone shed any light as to why these permissions are always requested or how to prevent them from being prompted for?