diff options
| author | 2023-05-02 19:01:53 +0000 | |
|---|---|---|
| committer | 2023-05-02 19:01:53 +0000 | |
| commit | 03d1e3886c2b2659a4821eebd970cbc9b5ccea52 (patch) | |
| tree | e3606eb0ffca33596d64f25f91350166c0f6c940 | |
| parent | 27a79e40591c7d2836531d1b3723618ed02463cb (diff) | |
| parent | 0dd12be2922c0def1eabe53199502b754d1540c3 (diff) | |
Merge "Remove BAL feature flag DefaultRescindBalPrivelegesFromPendingIntentSender so that the feature is always enabled."
| -rw-r--r-- | services/core/java/com/android/server/am/PendingIntentRecord.java | 15 | ||||
| -rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java | 5 |
2 files changed, 1 insertions, 19 deletions
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java index daf227c029a1..939f151c5d98 100644 --- a/services/core/java/com/android/server/am/PendingIntentRecord.java +++ b/services/core/java/com/android/server/am/PendingIntentRecord.java @@ -46,7 +46,6 @@ import android.os.RemoteCallbackList; import android.os.RemoteException; import android.os.TransactionTooLargeException; import android.os.UserHandle; -import android.provider.DeviceConfig; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Slog; @@ -68,10 +67,6 @@ public final class PendingIntentRecord extends IIntentSender.Stub { @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.TIRAMISU) @Overridable private static final long DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER = 244637991; - private static final String ENABLE_DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER = - "DefaultRescindBalPrivilegesFromPendingIntentSender__" - + "enable_default_rescind_bal_privileges_from_pending_intent_sender"; - public static final int FLAG_ACTIVITY_SENDER = 1 << 0; public static final int FLAG_BROADCAST_SENDER = 1 << 1; public static final int FLAG_SERVICE_SENDER = 1 << 2; @@ -373,13 +368,6 @@ public final class PendingIntentRecord extends IIntentSender.Stub { : BackgroundStartPrivileges.NONE; } - private static boolean isDefaultRescindBalPrivilegesFromPendingIntentSenderEnabled() { - return DeviceConfig.getBoolean( - DeviceConfig.NAMESPACE_WINDOW_MANAGER, - ENABLE_DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER, - false); // assume false if the property is unknown - } - /** * Default {@link BackgroundStartPrivileges} to be used if the intent sender has not made an * explicit choice. @@ -393,10 +381,9 @@ public final class PendingIntentRecord extends IIntentSender.Stub { }) public static BackgroundStartPrivileges getDefaultBackgroundStartPrivileges( int callingUid) { - boolean isFlagEnabled = isDefaultRescindBalPrivilegesFromPendingIntentSenderEnabled(); boolean isChangeEnabledForApp = CompatChanges.isChangeEnabled( DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER, callingUid); - if (isFlagEnabled && isChangeEnabledForApp) { + if (isChangeEnabledForApp) { return BackgroundStartPrivileges.ALLOW_FGS; } else { return BackgroundStartPrivileges.ALLOW_BAL; diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java index b46a3b9955dc..95fc0faf50ba 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java @@ -144,9 +144,6 @@ import java.util.Set; @RunWith(WindowTestRunner.class) public class ActivityStarterTests extends WindowTestsBase { - private static final String ENABLE_DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER = - "DefaultRescindBalPrivilegesFromPendingIntentSender__" - + "enable_default_rescind_bal_privileges_from_pending_intent_sender"; private static final int PRECONDITION_NO_CALLER_APP = 1; private static final int PRECONDITION_NO_INTENT_COMPONENT = 1 << 1; private static final int PRECONDITION_NO_ACTIVITY_INFO = 1 << 2; @@ -184,8 +181,6 @@ public class ActivityStarterTests extends WindowTestsBase { doReturn(AppOpsManager.MODE_DEFAULT).when(mAppOpsManager).checkOpNoThrow( eq(AppOpsManager.OP_SYSTEM_EXEMPT_FROM_ACTIVITY_BG_START_RESTRICTION), anyInt(), any()); - mDeviceConfig.set(ENABLE_DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER, - String.valueOf(true)); } @After |