Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9b0058a authored by Achim Thesmann's avatar Achim Thesmann Committed by Android Build Coastguard Worker
Browse files

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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fe247c242cf59433ae91efd85d0404e94df4dbe4)
Merged-In: I3b31e198dab43da2af24982993f1e7a6740f9210
Change-Id: I3b31e198dab43da2af24982993f1e7a6740f9210
parent d2f0725f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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) {
+1 −4
Original line number Diff line number Diff line
@@ -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);
    }