In my app, I'm checking the Build.VERSION.SDK_INT in order to conditionally warn users that they need to update Android in order to use a particular feature. It looks something like this:
if (Build.VERSION.SDK_INT >= 15) {
// Good to go
} else {
// Needs an Android update
}
In the latest update I released, the READ_PHONE_STATE
permission has been added, even though it is not declared in AndroidManifest.xml
which looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.me.myapp"
android:versionCode="1"
android:versionName="1.0.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.vending.BILLING" />
...
I've found a couple of related questions (1, 2), and I'll try to test later if my dependencies are causing the issue.
But just out of curiosity (and since I can't access my code right now), will using Build.VERSION.SDK_INT
cause the READ_PHONE_STATE
permission to be added automatically?
Or better yet, what might cause this permission to automatically be added?