Loading cmds/statsd/src/atoms.proto +2 −1 Original line number Diff line number Diff line Loading @@ -6914,7 +6914,8 @@ message DeviceIdentifierAccessDenied { optional string method_name = 2; // True if the package is preinstalled. optional bool is_preinstalled = 3; // Starting from Android 11, this boolean is not set and will always be false. optional bool is_preinstalled = 3 [deprecated = true]; // True if the package is privileged. // Starting from Android 11, this boolean is not set and will always be false. Loading telephony/common/com/android/internal/telephony/TelephonyPermissions.java +2 −9 Original line number Diff line number Diff line Loading @@ -363,16 +363,10 @@ public final class TelephonyPermissions { */ private static boolean reportAccessDeniedToReadIdentifiers(Context context, int subId, int pid, int uid, String callingPackage, String message) { boolean isPreinstalled = false; ApplicationInfo callingPackageInfo = null; try { callingPackageInfo = context.getPackageManager().getApplicationInfoAsUser( callingPackage, 0, UserHandle.getUserHandleForUid(uid)); if (callingPackageInfo != null) { if (callingPackageInfo.isSystemApp()) { isPreinstalled = true; } } } catch (PackageManager.NameNotFoundException e) { // If the application info for the calling package could not be found then assume the // calling app is a non-preinstalled app to detect any issues with the check Loading @@ -393,10 +387,9 @@ public final class TelephonyPermissions { } invokedMethods.add(message); TelephonyCommonStatsLog.write(TelephonyCommonStatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED, callingPackage, message, isPreinstalled, false); callingPackage, message, /* isPreinstalled= */ false, false); } Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message + ":isPreinstalled=" + isPreinstalled); Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message); // if the target SDK is pre-Q then check if the calling package would have previously // had access to device identifiers. if (callingPackageInfo != null && ( Loading Loading
cmds/statsd/src/atoms.proto +2 −1 Original line number Diff line number Diff line Loading @@ -6914,7 +6914,8 @@ message DeviceIdentifierAccessDenied { optional string method_name = 2; // True if the package is preinstalled. optional bool is_preinstalled = 3; // Starting from Android 11, this boolean is not set and will always be false. optional bool is_preinstalled = 3 [deprecated = true]; // True if the package is privileged. // Starting from Android 11, this boolean is not set and will always be false. Loading
telephony/common/com/android/internal/telephony/TelephonyPermissions.java +2 −9 Original line number Diff line number Diff line Loading @@ -363,16 +363,10 @@ public final class TelephonyPermissions { */ private static boolean reportAccessDeniedToReadIdentifiers(Context context, int subId, int pid, int uid, String callingPackage, String message) { boolean isPreinstalled = false; ApplicationInfo callingPackageInfo = null; try { callingPackageInfo = context.getPackageManager().getApplicationInfoAsUser( callingPackage, 0, UserHandle.getUserHandleForUid(uid)); if (callingPackageInfo != null) { if (callingPackageInfo.isSystemApp()) { isPreinstalled = true; } } } catch (PackageManager.NameNotFoundException e) { // If the application info for the calling package could not be found then assume the // calling app is a non-preinstalled app to detect any issues with the check Loading @@ -393,10 +387,9 @@ public final class TelephonyPermissions { } invokedMethods.add(message); TelephonyCommonStatsLog.write(TelephonyCommonStatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED, callingPackage, message, isPreinstalled, false); callingPackage, message, /* isPreinstalled= */ false, false); } Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message + ":isPreinstalled=" + isPreinstalled); Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message); // if the target SDK is pre-Q then check if the calling package would have previously // had access to device identifiers. if (callingPackageInfo != null && ( Loading