diff options
-rw-r--r-- | cmds/statsd/src/atoms.proto | 3 | ||||
-rw-r--r-- | telephony/common/com/android/internal/telephony/TelephonyPermissions.java | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index d9083886f817..c72e89b481ee 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -6237,7 +6237,8 @@ message DeviceIdentifierAccessDenied { optional bool is_preinstalled = 3; // True if the package is privileged. - optional bool is_priv_app = 4; + // Starting from Android 11, this boolean is not set and will always be false. + optional bool is_priv_app = 4 [deprecated = true]; } /** diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java index 5beb06d8595a..2077800cd808 100644 --- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java +++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java @@ -365,7 +365,6 @@ public final class TelephonyPermissions { private static boolean reportAccessDeniedToReadIdentifiers(Context context, int subId, int pid, int uid, String callingPackage, String message) { boolean isPreinstalled = false; - boolean isPrivApp = false; ApplicationInfo callingPackageInfo = null; try { callingPackageInfo = context.getPackageManager().getApplicationInfoAsUser( @@ -373,9 +372,6 @@ public final class TelephonyPermissions { if (callingPackageInfo != null) { if (callingPackageInfo.isSystemApp()) { isPreinstalled = true; - if (callingPackageInfo.isPrivilegedApp()) { - isPrivApp = true; - } } } } catch (PackageManager.NameNotFoundException e) { @@ -398,10 +394,10 @@ public final class TelephonyPermissions { } invokedMethods.add(message); StatsLog.write(StatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED, callingPackage, message, - isPreinstalled, isPrivApp); + isPreinstalled, false); } Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message - + ":isPreinstalled=" + isPreinstalled + ":isPrivApp=" + isPrivApp); + + ":isPreinstalled=" + isPreinstalled); // if the target SDK is pre-Q then check if the calling package would have previously // had access to device identifiers. if (callingPackageInfo != null && ( |