Loading tools/aapt/Command.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -625,6 +625,11 @@ int doDump(Bundle* bundle) bool actImeService = false; bool actWallpaperService = false; // These two implement the implicit permissions that are granted // to pre-1.6 applications. bool hasWriteExternalStoragePermission = false; bool hasReadPhoneStatePermission = false; // This next group of variables is used to implement a group of // backward-compatibility heuristics necessitated by the addition of // some new uses-feature constants in 2.1 and 2.2. In most cases, the Loading Loading @@ -986,6 +991,10 @@ int doDump(Bundle* bundle) name == "android.permission.WRITE_APN_SETTINGS" || name == "android.permission.WRITE_SMS") { hasTelephonyPermission = true; } else if (name == "android.permission.WRITE_EXTERNAL_STORAGE") { hasWriteExternalStoragePermission = true; } else if (name == "android.permission.READ_PHONE_STATE") { hasReadPhoneStatePermission = true; } printf("uses-permission:'%s'\n", name.string()); } else { Loading Loading @@ -1144,6 +1153,16 @@ int doDump(Bundle* bundle) } } // Pre-1.6 implicitly granted permission compatibility logic if (targetSdk < 4) { if (!hasWriteExternalStoragePermission) { printf("uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'\n"); } if (!hasReadPhoneStatePermission) { printf("uses-permission:'android.permission.READ_PHONE_STATE'\n"); } } /* The following blocks handle printing "inferred" uses-features, based * on whether related features or permissions are used by the app. * Note that the various spec*Feature variables denote whether the Loading Loading
tools/aapt/Command.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -625,6 +625,11 @@ int doDump(Bundle* bundle) bool actImeService = false; bool actWallpaperService = false; // These two implement the implicit permissions that are granted // to pre-1.6 applications. bool hasWriteExternalStoragePermission = false; bool hasReadPhoneStatePermission = false; // This next group of variables is used to implement a group of // backward-compatibility heuristics necessitated by the addition of // some new uses-feature constants in 2.1 and 2.2. In most cases, the Loading Loading @@ -986,6 +991,10 @@ int doDump(Bundle* bundle) name == "android.permission.WRITE_APN_SETTINGS" || name == "android.permission.WRITE_SMS") { hasTelephonyPermission = true; } else if (name == "android.permission.WRITE_EXTERNAL_STORAGE") { hasWriteExternalStoragePermission = true; } else if (name == "android.permission.READ_PHONE_STATE") { hasReadPhoneStatePermission = true; } printf("uses-permission:'%s'\n", name.string()); } else { Loading Loading @@ -1144,6 +1153,16 @@ int doDump(Bundle* bundle) } } // Pre-1.6 implicitly granted permission compatibility logic if (targetSdk < 4) { if (!hasWriteExternalStoragePermission) { printf("uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'\n"); } if (!hasReadPhoneStatePermission) { printf("uses-permission:'android.permission.READ_PHONE_STATE'\n"); } } /* The following blocks handle printing "inferred" uses-features, based * on whether related features or permissions are used by the app. * Note that the various spec*Feature variables denote whether the Loading