Loading services/core/java/com/android/server/wm/BackgroundActivityStartController.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -1164,8 +1164,9 @@ public class BackgroundActivityStartController { * or {@link #BAL_BLOCK} if the launch should be blocked * or {@link #BAL_BLOCK} if the launch should be blocked */ */ BalVerdict checkBackgroundActivityStartAllowedByRealCallerInBackground(BalState state) { BalVerdict checkBackgroundActivityStartAllowedByRealCallerInBackground(BalState state) { if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() boolean allowAlways = state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS; if (allowAlways && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) { && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) { return new BalVerdict(BAL_ALLOW_PERMISSION, return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ false, /*background*/ false, Loading @@ -1177,8 +1178,7 @@ public class BackgroundActivityStartController { + state.mRealCallingPid + ", " + state.mRealCallingPackage + ") " + state.mRealCallingPid + ", " + state.mRealCallingPackage + ") " + balStartModeToString( + balStartModeToString( state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode())); state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode())); if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() if (allowAlways == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS && mService.hasSystemAlertWindowPermission(state.mRealCallingUid, && mService.hasSystemAlertWindowPermission(state.mRealCallingUid, state.mRealCallingPid, state.mRealCallingPackage)) { state.mRealCallingPid, state.mRealCallingPackage)) { Slog.w( Slog.w( Loading @@ -1192,7 +1192,7 @@ public class BackgroundActivityStartController { // if the realCallingUid is a persistent system process, abort if the IntentSender // if the realCallingUid is a persistent system process, abort if the IntentSender // wasn't allowed to start an activity // wasn't allowed to start an activity if (state.mAllowBalExemptionForSystemProcess if ((allowAlways || state.mAllowBalExemptionForSystemProcess) && state.mIsRealCallingUidPersistentSystemProcess) { && state.mIsRealCallingUidPersistentSystemProcess) { return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, /*background*/ false, /*background*/ false, Loading Loading
services/core/java/com/android/server/wm/BackgroundActivityStartController.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -1164,8 +1164,9 @@ public class BackgroundActivityStartController { * or {@link #BAL_BLOCK} if the launch should be blocked * or {@link #BAL_BLOCK} if the launch should be blocked */ */ BalVerdict checkBackgroundActivityStartAllowedByRealCallerInBackground(BalState state) { BalVerdict checkBackgroundActivityStartAllowedByRealCallerInBackground(BalState state) { if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() boolean allowAlways = state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS; if (allowAlways && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) { && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) { return new BalVerdict(BAL_ALLOW_PERMISSION, return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ false, /*background*/ false, Loading @@ -1177,8 +1178,7 @@ public class BackgroundActivityStartController { + state.mRealCallingPid + ", " + state.mRealCallingPackage + ") " + state.mRealCallingPid + ", " + state.mRealCallingPackage + ") " + balStartModeToString( + balStartModeToString( state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode())); state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode())); if (state.mCheckedOptions.getPendingIntentBackgroundActivityStartMode() if (allowAlways == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS && mService.hasSystemAlertWindowPermission(state.mRealCallingUid, && mService.hasSystemAlertWindowPermission(state.mRealCallingUid, state.mRealCallingPid, state.mRealCallingPackage)) { state.mRealCallingPid, state.mRealCallingPackage)) { Slog.w( Slog.w( Loading @@ -1192,7 +1192,7 @@ public class BackgroundActivityStartController { // if the realCallingUid is a persistent system process, abort if the IntentSender // if the realCallingUid is a persistent system process, abort if the IntentSender // wasn't allowed to start an activity // wasn't allowed to start an activity if (state.mAllowBalExemptionForSystemProcess if ((allowAlways || state.mAllowBalExemptionForSystemProcess) && state.mIsRealCallingUidPersistentSystemProcess) { && state.mIsRealCallingUidPersistentSystemProcess) { return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, /*background*/ false, /*background*/ false, Loading