+ printf("uses-implied-permission:'android.permission.READ_PHONE_STATE'," \
+ "'targetSdkVersion < 4'\n");
+ }
+ }
+
+ // If the application has requested WRITE_EXTERNAL_STORAGE, we will
+ // force them to always take READ_EXTERNAL_STORAGE as well.
+ if (!hasReadExternalStoragePermission && hasWriteExternalStoragePermission) {
+ printf("uses-permission:'android.permission.READ_EXTERNAL_STORAGE'\n");
+ printf("uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE'," \
+ "'requested WRITE_EXTERNAL_STORAGE'\n");
+ }
+
+ // Pre-JellyBean call log permission compatibility.
+ if (targetSdk < 16) {
+ if (!hasReadCallLogPermission && hasReadContactsPermission) {
+ printf("uses-permission:'android.permission.READ_CALL_LOG'\n");
+ printf("uses-implied-permission:'android.permission.READ_CALL_LOG'," \
+ "'targetSdkVersion < 16 and requested READ_CONTACTS'\n");
+ }
+ if (!hasWriteCallLogPermission && hasWriteContactsPermission) {
+ printf("uses-permission:'android.permission.WRITE_CALL_LOG'\n");
+ printf("uses-implied-permission:'android.permission.WRITE_CALL_LOG'," \
+ "'targetSdkVersion < 16 and requested WRITE_CONTACTS'\n");