diff options
5 files changed, 48 insertions, 77 deletions
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java index f51e60c101e4..c74220277759 100644 --- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java +++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java @@ -638,14 +638,13 @@ public class BackgroundActivityStartController { } static class BalVerdict { - static final BalVerdict BLOCK = new BalVerdict(BAL_BLOCK, false, "Blocked"); + static final BalVerdict BLOCK = new BalVerdict(BAL_BLOCK, "Blocked"); static final BalVerdict ALLOW_BY_DEFAULT = - new BalVerdict(BAL_ALLOW_DEFAULT, false, "Default"); + new BalVerdict(BAL_ALLOW_DEFAULT, "Default"); // Careful using this - it will bypass all ASM checks. static final BalVerdict ALLOW_PRIVILEGED = - new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, false, "PRIVILEGED"); + new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, "PRIVILEGED"); private final @BalCode int mCode; - private final boolean mBackground; private final String mMessage; private String mProcessInfo; // indicates BAL would be blocked because only creator of the PI has the privilege to allow @@ -654,8 +653,7 @@ public class BackgroundActivityStartController { /** indicates that this verdict is based on the real calling UID and not the calling UID */ private boolean mBasedOnRealCaller; - BalVerdict(@BalCode int balCode, boolean background, String message) { - this.mBackground = background; + BalVerdict(@BalCode int balCode, String message) { this.mCode = balCode; this.mMessage = message; } @@ -708,16 +706,7 @@ public class BackgroundActivityStartController { builder.append(" [realCaller]"); } if (DEBUG_ACTIVITY_STARTS) { - builder.append(" ("); - if (mBackground) { - builder.append("Background "); - } - builder.append("Activity start "); - if (mCode == BAL_BLOCK) { - builder.append("denied"); - } else { - builder.append("allowed: ").append(mMessage); - } + builder.append(" (").append(mMessage); if (mProcessInfo != null) { builder.append(" "); builder.append(mProcessInfo); @@ -795,7 +784,6 @@ public class BackgroundActivityStartController { // to realCallingUid when calculating resultForRealCaller below. if (getService().hasActiveVisibleWindow(realCallingSdkSandboxUidToAppUid)) { state.setResultForRealCaller(new BalVerdict(BAL_ALLOW_SDK_SANDBOX, - /*background*/ false, "uid in SDK sandbox has visible (non-toast) window")); return allowBasedOnRealCaller(state); } @@ -1059,8 +1047,7 @@ public class BackgroundActivityStartController { || state.mAppSwitchState == APP_SWITCH_FG_ONLY || isHomeApp(state.mCallingUid, state.mCallingPackage); if (appSwitchAllowedOrFg && state.mCallingUidHasVisibleActivity) { - return new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, - /*background*/ false, "callingUid has visible window"); + return new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "callingUid has visible window"); } return BalVerdict.BLOCK; }; @@ -1068,7 +1055,7 @@ public class BackgroundActivityStartController { private final BalExemptionCheck mCheckCallerNonAppVisible = state -> { if (state.mCallingUidHasNonAppVisibleWindow) { return new BalVerdict(BAL_ALLOW_NON_APP_VISIBLE_WINDOW, - /*background*/ false, "callingUid has non-app visible window " + "callingUid has non-app visible window " + getService().mActiveUids.getNonAppVisibleWindowDetails(state.mCallingUid)); } return BalVerdict.BLOCK; @@ -1080,9 +1067,7 @@ public class BackgroundActivityStartController { if (state.mCallingUid == Process.ROOT_UID || callingAppId == Process.SYSTEM_UID || callingAppId == Process.NFC_UID) { - return new BalVerdict( - BAL_ALLOW_ALLOWLISTED_UID, /*background*/ false, - "Important callingUid"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, "Important callingUid"); } return BalVerdict.BLOCK; }; @@ -1090,9 +1075,7 @@ public class BackgroundActivityStartController { private final BalExemptionCheck mCheckCallerIsAllowlistedComponent = state -> { // Always allow home application to start activities. if (isHomeApp(state.mCallingUid, state.mCallingPackage)) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ false, - "Home app"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Home app"); } final int callingAppId = UserHandle.getAppId(state.mCallingUid); @@ -1100,37 +1083,31 @@ public class BackgroundActivityStartController { final WindowState imeWindow = getService().mRootWindowContainer.getCurrentInputMethodWindow(); if (imeWindow != null && callingAppId == imeWindow.mOwnerUid) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ false, - "Active ime"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Active ime"); } // don't abort if the callingUid is a persistent system process if (state.mIsCallingUidPersistentSystemProcess) { return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ false, "callingUid is persistent system process"); + "callingUid is persistent system process"); } // don't abort if the caller has the same uid as the recents component if (getSupervisor().mRecentTasks.isCallerRecents(state.mCallingUid)) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ true, "Recents Component"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Recents Component"); } // don't abort if the callingUid is the device owner if (getService().isDeviceOwner(state.mCallingUid)) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ true, "Device Owner"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Device Owner"); } // don't abort if the callingUid is a affiliated profile owner if (getService().isAffiliatedProfileOwner(state.mCallingUid)) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ true, "Affiliated Profile Owner"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Affiliated Profile Owner"); } // don't abort if the callingUid has companion device final int callingUserId = UserHandle.getUserId(state.mCallingUid); if (getService().isAssociatedCompanionApp(callingUserId, state.mCallingUid)) { - return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ true, "Companion App"); + return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, "Companion App"); } return BalVerdict.BLOCK; }; @@ -1139,7 +1116,6 @@ public class BackgroundActivityStartController { // don't abort if the callingUid has START_ACTIVITIES_FROM_BACKGROUND permission if (hasBalPermission(state.mCallingUid, state.mCallingPid)) { return new BalVerdict(BAL_ALLOW_PERMISSION, - /*background*/ true, "START_ACTIVITIES_FROM_BACKGROUND permission granted"); } return BalVerdict.BLOCK; @@ -1149,7 +1125,7 @@ public class BackgroundActivityStartController { if (getService().hasSystemAlertWindowPermission(state.mCallingUid, state.mCallingPid, state.mCallingPackage)) { return new BalVerdict(BAL_ALLOW_SAW_PERMISSION, - /*background*/ true, "SYSTEM_ALERT_WINDOW permission is granted"); + "SYSTEM_ALERT_WINDOW permission is granted"); } return BalVerdict.BLOCK; }; @@ -1159,7 +1135,7 @@ public class BackgroundActivityStartController { if (isSystemExemptFlagEnabled() && getService().getAppOpsManager().checkOpNoThrow( AppOpsManager.OP_SYSTEM_EXEMPT_FROM_ACTIVITY_BG_START_RESTRICTION, state.mCallingUid, state.mCallingPackage) == AppOpsManager.MODE_ALLOWED) { - return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ true, + return new BalVerdict(BAL_ALLOW_PERMISSION, "OP_SYSTEM_EXEMPT_FROM_ACTIVITY_BG_START_RESTRICTION appop is granted"); } return BalVerdict.BLOCK; @@ -1200,8 +1176,7 @@ public class BackgroundActivityStartController { || state.mAppSwitchState == APP_SWITCH_FG_ONLY || isHomeApp(state.mRealCallingUid, state.mRealCallingPackage); if (appSwitchAllowedOrFg && state.mRealCallingUidHasVisibleActivity) { - return new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, - /*background*/ false, "realCallingUid has visible window"); + return new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "realCallingUid has visible window"); } return BalVerdict.BLOCK; }; @@ -1209,9 +1184,9 @@ public class BackgroundActivityStartController { private final BalExemptionCheck mCheckRealCallerNonAppVisible = state -> { if (state.mRealCallingUidHasNonAppVisibleWindow) { return new BalVerdict(BAL_ALLOW_NON_APP_VISIBLE_WINDOW, - /*background*/ false, "realCallingUid has non-app visible window " - + getService().mActiveUids.getNonAppVisibleWindowDetails( - state.mRealCallingUid)); + "realCallingUid has non-app visible window " + + getService().mActiveUids.getNonAppVisibleWindowDetails( + state.mRealCallingUid)); } return BalVerdict.BLOCK; }; @@ -1230,9 +1205,7 @@ public class BackgroundActivityStartController { == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS; if (allowAlways && hasBalPermission(state.mRealCallingUid, state.mRealCallingPid)) { - return new BalVerdict(BAL_ALLOW_PERMISSION, - /*background*/ false, - "realCallingUid has BAL permission."); + return new BalVerdict(BAL_ALLOW_PERMISSION, "realCallingUid has BAL permission."); } return BalVerdict.BLOCK; }; @@ -1245,7 +1218,7 @@ public class BackgroundActivityStartController { && getService().hasSystemAlertWindowPermission(state.mRealCallingUid, state.mRealCallingPid, state.mRealCallingPackage)) { return new BalVerdict(BAL_ALLOW_SAW_PERMISSION, - /*background*/ true, "SYSTEM_ALERT_WINDOW permission is granted"); + "SYSTEM_ALERT_WINDOW permission is granted"); } return BalVerdict.BLOCK; }; @@ -1258,7 +1231,6 @@ public class BackgroundActivityStartController { if ((allowAlways || state.mAllowBalExemptionForSystemProcess) && state.mIsRealCallingUidPersistentSystemProcess) { return new BalVerdict(BAL_ALLOW_ALLOWLISTED_UID, - /*background*/ false, "realCallingUid is persistent system process AND intent " + "sender forced to allow."); } @@ -1270,7 +1242,6 @@ public class BackgroundActivityStartController { if (getService().isAssociatedCompanionApp( UserHandle.getUserId(state.mRealCallingUid), state.mRealCallingUid)) { return new BalVerdict(BAL_ALLOW_ALLOWLISTED_COMPONENT, - /*background*/ false, "realCallingUid is a companion app."); } return BalVerdict.BLOCK; diff --git a/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java b/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java index ccf1aedb3177..31b239421baf 100644 --- a/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java +++ b/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java @@ -125,27 +125,27 @@ class BackgroundLaunchProcessController { long lastActivityFinishTime) { // Allow if the proc is instrumenting with background activity starts privs. if (checkConfiguration.checkOtherExemptions && hasBackgroundActivityStartPrivileges) { - return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ true, + return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ "process instrumenting with background activity starts privileges"); } // Allow if the flag was explicitly set. if (checkConfiguration.checkOtherExemptions && isBackgroundStartAllowedByToken(uid, packageName, checkConfiguration.isCheckingForFgsStart)) { return new BalVerdict(balImprovedMetrics() ? BAL_ALLOW_TOKEN : BAL_ALLOW_PERMISSION, - /*background*/ true, "process allowed by token"); + /*background*/ "process allowed by token"); } // Allow if the caller is bound by a UID that's currently foreground. // But still respect the appSwitchState. if (checkConfiguration.checkVisibility && appSwitchState != APP_SWITCH_DISALLOW && isBoundByForegroundUid()) { return new BalVerdict(balImprovedMetrics() ? BAL_ALLOW_BOUND_BY_FOREGROUND - : BAL_ALLOW_VISIBLE_WINDOW, /*background*/ false, + : BAL_ALLOW_VISIBLE_WINDOW, /*background*/ "process bound by foreground uid"); } // Allow if the caller has an activity in any foreground task. if (checkConfiguration.checkOtherExemptions && hasActivityInVisibleTask && appSwitchState != APP_SWITCH_DISALLOW) { - return new BalVerdict(BAL_ALLOW_FOREGROUND, /*background*/ false, + return new BalVerdict(BAL_ALLOW_FOREGROUND, /*background*/ "process has activity in foreground task"); } @@ -160,7 +160,7 @@ class BackgroundLaunchProcessController { long timeSinceLastStartOrFinish = now - Math.max(lastActivityLaunchTime, lastActivityFinishTime); if (timeSinceLastStartOrFinish < checkConfiguration.gracePeriod) { - return new BalVerdict(BAL_ALLOW_GRACE_PERIOD, /*background*/ true, + return new BalVerdict(BAL_ALLOW_GRACE_PERIOD, /*background*/ "within " + checkConfiguration.gracePeriod + "ms grace period (" + timeSinceLastStartOrFinish + "ms)"); } diff --git a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerExemptionTests.java b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerExemptionTests.java index c934c55dfb8e..e3a8776aca6a 100644 --- a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerExemptionTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerExemptionTests.java @@ -486,7 +486,7 @@ public class BackgroundActivityStartControllerExemptionTests { // setup state when(mCallerApp.areBackgroundActivityStartsAllowed(anyInt(), any())).thenReturn( - new BalVerdict(BAL_ALLOW_FOREGROUND, false, "allowed")); + new BalVerdict(BAL_ALLOW_FOREGROUND, "allowed")); when(mService.getBalAppSwitchesState()).thenReturn(APP_SWITCH_ALLOW); // prepare call @@ -523,7 +523,7 @@ public class BackgroundActivityStartControllerExemptionTests { mCallerApp); when(mService.getBalAppSwitchesState()).thenReturn(APP_SWITCH_ALLOW); when(mCallerApp.areBackgroundActivityStartsAllowed(anyInt(), any())).thenReturn( - new BalVerdict(BAL_ALLOW_FOREGROUND, false, "allowed")); + new BalVerdict(BAL_ALLOW_FOREGROUND, "allowed")); // prepare call PendingIntentRecord originatingPendingIntent = mPendingIntentRecord; @@ -572,7 +572,7 @@ public class BackgroundActivityStartControllerExemptionTests { when(mCallerApp.areBackgroundActivityStartsAllowed(anyInt(), any())).thenReturn( BalVerdict.BLOCK); when(otherProcess.areBackgroundActivityStartsAllowed(anyInt(), any())).thenReturn( - new BalVerdict(BAL_ALLOW_FOREGROUND, false, "allowed")); + new BalVerdict(BAL_ALLOW_FOREGROUND, "allowed")); // prepare call PendingIntentRecord originatingPendingIntent = mPendingIntentRecord; diff --git a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerLogTests.java b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerLogTests.java index 99e730ae76cf..cd5f3912bfc6 100644 --- a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerLogTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerLogTests.java @@ -92,7 +92,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void intent_visible_noLog() { useIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "visible"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "visible"); mState.setResultForCaller(finalVerdict); mState.setResultForRealCaller(BalVerdict.BLOCK); assertThat(mController.shouldLogStats(finalVerdict, mState)).isFalse(); @@ -101,7 +101,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void intent_saw_log() { useIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, "SAW"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW"); mState.setResultForCaller(finalVerdict); mState.setResultForRealCaller(BalVerdict.BLOCK); assertThat(mController.shouldLogStats(finalVerdict, mState)).isTrue(); @@ -111,7 +111,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_callerOnly_saw_log() { usePendingIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, "SAW"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW"); mState.setResultForCaller(finalVerdict); mState.setResultForRealCaller(BalVerdict.BLOCK); assertThat(mController.shouldLogStats(finalVerdict, mState)).isTrue(); @@ -121,7 +121,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_realCallerOnly_saw_log() { usePendingIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, "SAW") + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW") .setBasedOnRealCaller(); mState.setResultForCaller(BalVerdict.BLOCK); mState.setResultForRealCaller(finalVerdict); @@ -131,7 +131,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void intent_shouldLogIntentActivity() { - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, "SAW"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW"); useIntent(APP1_UID); assertThat(mController.shouldLogIntentActivity(finalVerdict, mState)).isFalse(); useIntent(SYSTEM_UID); @@ -140,7 +140,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_shouldLogIntentActivityForCaller() { - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, "SAW"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW"); usePendingIntent(APP1_UID, APP2_UID); assertThat(mController.shouldLogIntentActivity(finalVerdict, mState)).isFalse(); usePendingIntent(SYSTEM_UID, SYSTEM_UID); @@ -153,7 +153,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_shouldLogIntentActivityForRealCaller() { - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, false, + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_SAW_PERMISSION, "SAW").setBasedOnRealCaller(); usePendingIntent(APP1_UID, APP2_UID); assertThat(mController.shouldLogIntentActivity(finalVerdict, mState)).isFalse(); @@ -168,7 +168,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_realCallerOnly_visible_noLog() { usePendingIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "visible").setBasedOnRealCaller(); mState.setResultForCaller(BalVerdict.BLOCK); mState.setResultForRealCaller(finalVerdict); @@ -178,7 +178,7 @@ public class BackgroundActivityStartControllerLogTests { @Test public void pendingIntent_callerOnly_visible_noLog() { usePendingIntent(); - BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "visible"); + BalVerdict finalVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "visible"); mState.setResultForCaller(finalVerdict); mState.setResultForRealCaller(BalVerdict.BLOCK); assertThat(mController.shouldLogStats(finalVerdict, mState)).isTrue(); diff --git a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerTests.java index 51706d72cb35..d0a843ddb330 100644 --- a/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/BackgroundActivityStartControllerTests.java @@ -305,7 +305,7 @@ public class BackgroundActivityStartControllerTests { @Test public void testRegularActivityStart_allowedByCaller_isAllowed() { // setup state - BalVerdict callerVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, + BalVerdict callerVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "CallerIsVisible"); mController.setCallerVerdict(callerVerdict); mController.setRealCallerVerdict(BalVerdict.BLOCK); @@ -340,7 +340,7 @@ public class BackgroundActivityStartControllerTests { @Test public void testRegularActivityStart_allowedByRealCaller_isAllowed() { // setup state - BalVerdict realCallerVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, + BalVerdict realCallerVerdict = new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "RealCallerIsVisible"); mController.setCallerVerdict(BalVerdict.BLOCK); mController.setRealCallerVerdict(realCallerVerdict); @@ -373,9 +373,9 @@ public class BackgroundActivityStartControllerTests { public void testRegularActivityStart_allowedByCallerAndRealCaller_returnsCallerVerdict() { // setup state BalVerdict callerVerdict = - new BalVerdict(BAL_ALLOW_PERMISSION, false, "CallerHasPermission"); + new BalVerdict(BAL_ALLOW_PERMISSION, "CallerHasPermission"); BalVerdict realCallerVerdict = - new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "RealCallerIsVisible"); + new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "RealCallerIsVisible"); mController.setCallerVerdict(callerVerdict); mController.setRealCallerVerdict(realCallerVerdict); @@ -411,9 +411,9 @@ public class BackgroundActivityStartControllerTests { public void testPendingIntent_allowedByCallerAndRealCallerButOptOut_isBlocked() { // setup state BalVerdict callerVerdict = - new BalVerdict(BAL_ALLOW_PERMISSION, false, "CallerhasPermission"); + new BalVerdict(BAL_ALLOW_PERMISSION, "CallerhasPermission"); BalVerdict realCallerVerdict = - new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "RealCallerIsVisible"); + new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "RealCallerIsVisible"); mController.setCallerVerdict(callerVerdict); mController.setRealCallerVerdict(realCallerVerdict); @@ -452,7 +452,7 @@ public class BackgroundActivityStartControllerTests { public void testPendingIntent_allowedByCallerAndOptIn_isAllowed() { // setup state BalVerdict callerVerdict = - new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "CallerIsVisible"); + new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "CallerIsVisible"); mController.setCallerVerdict(callerVerdict); mController.setRealCallerVerdict(BalVerdict.BLOCK); @@ -489,7 +489,7 @@ public class BackgroundActivityStartControllerTests { public void testPendingIntent_allowedByRealCallerAndOptIn_isAllowed() { // setup state BalVerdict realCallerVerdict = - new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, false, "RealCallerIsVisible"); + new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, "RealCallerIsVisible"); mController.setCallerVerdict(BalVerdict.BLOCK); mController.setRealCallerVerdict(realCallerVerdict); |