diff options
author | Meng Wang <mewan@google.com> | 2020-01-29 23:47:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-01-29 23:47:12 +0000 |
commit | 603f29f2192046729a3a0957c975a3afeeda913b (patch) | |
tree | 8c467bbb7674cb12c2c78d2ce4345eadfd298658 /telephony/common | |
parent | 677b004d84685e8f24321f17917846a1af25ebba (diff) | |
parent | e8953ae762dcc3c5b75ca37c0d050f7382b37946 (diff) |
Merge "DeviceIdentifierAccessDenied: deprecate is_preinstalled"
Diffstat (limited to 'telephony/common')
-rw-r--r-- | telephony/common/com/android/internal/telephony/TelephonyPermissions.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java index 7b3aace798f7..b89772538c6d 100644 --- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java +++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java @@ -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 @@ -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 && ( |