From f17894f341a4a29d791901d37e396db6a02dabb2 Mon Sep 17 00:00:00 2001 From: Michael Groover Date: Wed, 25 Mar 2020 20:29:27 -0700 Subject: Clean up device identifier access logging This commit removes the log message from DevicePolicyManagerService when a caller fails the access requirements as it can be confusing if the caller subsequently passes a carrier privilege check and can access identifiers, or in the case where the caller does not have access a similar entry is logged by TelephonyPermissions. The subId for which the carrier privilege check is performed is also logged to facilitate debugging. Bug: 152117976 Test: atest SubscriptionControllerTest Change-Id: I6d88d739a0d9053e8eff32d74d90009699abe8fc --- .../common/com/android/internal/telephony/TelephonyPermissions.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'telephony/common') diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java index 0b331744d922..3bf3444d4197 100644 --- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java +++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java @@ -361,7 +361,8 @@ public final class TelephonyPermissions { TelephonyCommonStatsLog.write(TelephonyCommonStatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED, callingPackage, message, /* isPreinstalled= */ false, false); } - Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message); + Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message + ":" + + subId); // if the target SDK is pre-Q then check if the calling package would have previously // had access to device identifiers. if (callingPackageInfo != null && ( -- cgit v1.2.3