Merge "Enhance media temp-allowlist logging" into tm-dev am: e8f7dc02c6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18820312

Change-Id: Ia87542eb69d2169eb89319f6a6e74e01eb5f35d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Makoto Onuki
2022-06-10 21:41:10 +00:00
committed by Automerger Merge Worker

View File

@@ -563,14 +563,16 @@ public class MediaSessionService extends SystemService implements Monitor {
try {
enforcePackageName(callingPackage, callingUid);
if (targetUid != callingUid) {
Log.d(TAG, "tempAllowlistTargetPkgIfPossible callingPackage:"
+ callingPackage + " targetPackage:" + targetPackage
+ " reason:" + reason);
boolean canAllowWhileInUse = mActivityManagerLocal
.canAllowWhileInUsePermissionInFgs(callingPid, callingUid, callingPackage);
boolean canStartFgs = canAllowWhileInUse
|| mActivityManagerLocal.canStartForegroundService(callingPid, callingUid,
callingPackage);
Log.i(TAG, "tempAllowlistTargetPkgIfPossible callingPackage:"
+ callingPackage + " targetPackage:" + targetPackage
+ " reason:" + reason
+ (canAllowWhileInUse ? " [WIU]" : "")
+ (canStartFgs ? " [FGS]" : ""));
if (canAllowWhileInUse) {
mActivityManagerLocal.tempAllowWhileInUsePermissionInFgs(targetUid,
MediaSessionDeviceConfig