diff options
| author | 2023-11-07 07:25:43 +0000 | |
|---|---|---|
| committer | 2023-11-07 07:40:43 +0000 | |
| commit | 7ca8de8c8790f6f3cc3d07f99a316e383f01eb3f (patch) | |
| tree | 9ceb72359449ab0ec1e61da49dd543a2ee373cbc | |
| parent | e35a7eadf9f88c451a72a13a872eb05aae3bb69f (diff) | |
Fix log status dump
Logic to dump status of PendingIntent cases was inverted.
Test: atest BackgroundActivityLaunchTest
Bug: 306059525
Change-Id: I7e6e813f0394fd9ba886843549ee49f673392329
| -rw-r--r-- | services/core/java/com/android/server/wm/BackgroundActivityStartController.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java index cdaab466bc1a..9605d5167b04 100644 --- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java +++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java @@ -321,6 +321,7 @@ public class BackgroundActivityStartController { .append(getDebugPackageName(mCallingPackage, mCallingUid)); sb.append("; callingUid: ").append(mCallingUid); sb.append("; callingPid: ").append(mCallingPid); + sb.append("; isPendingIntent: ").append(isPendingIntent()); sb.append("; appSwitchState: ").append(mAppSwitchState); sb.append("; callingUidHasAnyVisibleWindow: ").append(mCallingUidHasAnyVisibleWindow); sb.append("; callingUidProcState: ").append(DebugUtils.valueToString( @@ -328,7 +329,7 @@ public class BackgroundActivityStartController { sb.append("; isCallingUidPersistentSystemProcess: ") .append(mIsCallingUidPersistentSystemProcess); sb.append("; balAllowedByPiCreator: ").append(mBalAllowedByPiCreator); - if (!isPendingIntent()) { + if (isPendingIntent()) { sb.append("; balAllowedByPiSender: ").append(mBalAllowedByPiSender); sb.append("; realCallingPackage: ") .append(getDebugPackageName(mRealCallingPackage, mRealCallingUid)); @@ -340,16 +341,18 @@ public class BackgroundActivityStartController { ActivityManager.class, "PROCESS_STATE_", mRealCallingUidProcState)); sb.append("; isRealCallingUidPersistentSystemProcess: ") .append(mIsRealCallingUidPersistentSystemProcess); + sb.append("; originatingPendingIntent: ").append(mOriginatingPendingIntent); } - sb.append("; originatingPendingIntent: ").append(mOriginatingPendingIntent); sb.append("; backgroundStartPrivileges: ").append(mBackgroundStartPrivileges); sb.append("; intent: ").append(mIntent); sb.append("; callerApp: ").append(mCallerApp); - sb.append("; realCallerApp: ").append(mRealCallerApp); + if (isPendingIntent()) { + sb.append("; realCallerApp: ").append(mRealCallerApp); + } if (mCallerApp != null) { sb.append("; inVisibleTask: ").append(mCallerApp.hasActivityInVisibleTask()); } - if (!isPendingIntent()) { + if (isPendingIntent()) { if (mRealCallerApp != null) { sb.append("; realInVisibleTask: ") .append(mRealCallerApp.hasActivityInVisibleTask()); |