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

Commit cde9e891 authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Add real calling package name to log.

To identyify the sender app that needs to be fixed we need the real
calling package, not the calling package.

Test: atest BackgroundActivityLaunchTest
Change-Id: I7c970d8d43e5e980e95f290cf2bdf1bab4020472
Bug: 236231785
parent 91769359
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -452,6 +452,9 @@ public class BackgroundActivityStartController {
        // If we are here, it means all exemptions not based on PI sender failed, so we'll block
        // unless resultIfPiSenderAllowsBal is an allow and the PI sender allows BAL

        String realCallingPackage = callingUid == realCallingUid ? callingPackage :
                mService.mContext.getPackageManager().getNameForUid(realCallingUid);

        String stateDumpLog = " [callingPackage: " + callingPackage
                + "; callingUid: " + callingUid
                + "; appSwitchState: " + appSwitchState
@@ -460,6 +463,7 @@ public class BackgroundActivityStartController {
                        ActivityManager.class, "PROCESS_STATE_", callingUidProcState)
                + "; isCallingUidPersistentSystemProcess: " + isCallingUidPersistentSystemProcess
                + "; balAllowedByPiSender: " + balAllowedByPiSender
                + "; realCallingPackage: " + realCallingPackage
                + "; realCallingUid: " + realCallingUid
                + "; realCallingUidHasAnyVisibleWindow: " + realCallingUidHasAnyVisibleWindow
                + "; realCallingUidProcState: " + DebugUtils.valueToString(