Forráskód Böngészése

Removed unneeded request for permission WRITE_SETTINGS, and commented permissions behaviour for API level >= 23 in AndroidManifest.xml

David A. Velasco 9 éve
szülő
commit
05e723ba20
1 módosított fájl, 16 hozzáadás és 2 törlés
  1. 16 2
      AndroidManifest.xml

+ 16 - 2
AndroidManifest.xml

@@ -26,12 +26,27 @@
         android:minSdkVersion="14"
         android:targetSdkVersion="23" />
 
+    <!-- GET_ACCOUNTS is needed for API < 23.
+        For API >= 23 results in the addition of CONTACTS group to the list of permissions that may be
+        dynamically disabled or enabled by the user after installation; but it is not important,
+        since GET_ACCOUNTS is an special case, the permission is not really needed to access accounts
+        owned by the app, our use case.
+        See note in http://developer.android.com/intl/es/reference/android/Manifest.permission.html#GET_ACCOUNTS -->
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+
+    <!-- USE_CREDENTIALS, MANAGE_ACCOUNTS and AUTHENTICATE_ACCOUNTS are needed for API < 23.
+        In API >= 23 the do not exist anymore -->
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />
     <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
     <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
+
+    <!-- WRITE_EXTERNAL_STORAGE may be enabled or disabled by the user after installation in
+        API >= 23; the app needs to handle this -->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+    <!-- Next permissions are always approved in installation time,
+        the apps needs to do nothing special in runtime -->
     <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
     <uses-permission android:name="android.permission.READ_SYNC_STATS" />
     <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
     <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
@@ -39,7 +54,6 @@
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.WAKE_LOCK" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
     <application
         android:name=".MainApp"