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

Commit 0efc9694 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Update the hardcoded value for the const CORE_DEFER_UNTIL_ACTIVE." into main

parents b2c1adb3 81a8c861
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ final class BroadcastRecord extends Binder {
     * treat {@link BroadcastOptions#DEFERRAL_POLICY_DEFAULT} as
     * {@link BroadcastOptions#DEFERRAL_POLICY_UNTIL_ACTIVE}.
     */
    static boolean CORE_DEFER_UNTIL_ACTIVE = false;
    static boolean CORE_DEFER_UNTIL_ACTIVE = true;

    /** Empty immutable list of receivers */
    static final List<Object> EMPTY_RECEIVERS = List.of();
+2 −2
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ import androidx.test.filters.SmallTest;
import com.android.server.compat.PlatformCompat;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -762,8 +763,6 @@ public class BroadcastRecordTest {

    @Test
    public void testCalculateDeferUntilActive_System() {
        BroadcastRecord.CORE_DEFER_UNTIL_ACTIVE = true;

        // Verify non-urgent behavior
        assertTrue(calculateDeferUntilActive(SYSTEM_UID, null, null, false, false));
        assertTrue(calculateDeferUntilActive(SYSTEM_UID, OPT_DEFAULT, null, false, false));
@@ -1055,6 +1054,7 @@ public class BroadcastRecordTest {
                10);
    }

    @Ignore
    @Test
    @EnableFlags(Flags.FLAG_LOG_BROADCAST_PROCESSED_EVENT)
    public void testUpdateBroadcastProcessedEventRecord_withNewAndExistingReceiver_multipleBroadcastProcessedEventRecordCreated() {