Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c70ed13 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Enhance media temp-allowlist logging

Bug: 235513310
Test: Press media session controll button after running...
  adb shell am compat enable MEDIA_CONTROL_SESSION_ACTIONS com.spotify.music
Change-Id: Ief468fbdb5f462217ac6f0e35ab35c590a51277b
parent d2a02887
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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