diff options
| author | 2025-02-27 03:39:23 +0000 | |
|---|---|---|
| committer | 2025-02-27 22:15:12 +0000 | |
| commit | 47d6c81eeae1caa8046f462e7d33eea12596ee40 (patch) | |
| tree | 21f4b85092c0668b143cea31aa1fe18210addb4c | |
| parent | fb47b4cc7665dfcc9fb09efa616413708c1c1b38 (diff) | |
Remove Flag to clear allowlist duration
The flag has been soaked, but needs tobe removed to release the security
fix.
Bug: 322159724
Flag: EXEMPT bugfix
Test: atest PendingIntentControllerTest
Change-Id: I3b31e198dab43da2af24982993f1e7a6740f9210
| -rw-r--r-- | services/core/java/com/android/server/am/PendingIntentRecord.java | 3 | ||||
| -rw-r--r-- | services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java index 2c0366e6a6db..ac30be99979e 100644 --- a/services/core/java/com/android/server/am/PendingIntentRecord.java +++ b/services/core/java/com/android/server/am/PendingIntentRecord.java @@ -31,7 +31,6 @@ import static android.os.Process.SYSTEM_UID; import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM; import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME; -import static com.android.window.flags.Flags.balClearAllowlistDuration; import android.annotation.IntDef; import android.annotation.Nullable; @@ -330,7 +329,7 @@ public final class PendingIntentRecord extends IIntentSender.Stub { mAllowBgActivityStartsForActivitySender.remove(token); mAllowBgActivityStartsForBroadcastSender.remove(token); mAllowBgActivityStartsForServiceSender.remove(token); - if (mAllowlistDuration != null && balClearAllowlistDuration()) { + if (mAllowlistDuration != null) { TempAllowListDuration duration = mAllowlistDuration.get(token); if (duration != null && duration.type == TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED) { diff --git a/services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java index d6349fc0651f..ab3784b07e10 100644 --- a/services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/am/PendingIntentControllerTest.java @@ -32,7 +32,6 @@ import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_SUPERSEDED import static com.android.server.am.PendingIntentRecord.CANCEL_REASON_USER_STOPPED; import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER; import static com.android.server.am.PendingIntentRecord.cancelReasonToString; -import static com.android.window.flags.Flags.balClearAllowlistDuration; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -216,9 +215,7 @@ public class PendingIntentControllerTest { pir.getAllowlistDurationLocked(token); assertNotNull(allowlistDurationLockedAfterClear); assertEquals(1000, allowlistDurationLockedAfterClear.duration); - assertEquals(balClearAllowlistDuration() - ? TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED - : TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_ALLOWED, + assertEquals(TEMPORARY_ALLOWLIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED, allowlistDurationLocked.type); } |