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

Commit 0546a0b7 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Fix AMST#incrementProcStateSeqAndNotifyAppsLocked.

Recently we changed the threshold proc_state used for
enforcing network restrictions, so updating the test taking
that change into account.

Bug: 177641226
Test: atest ./services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
Change-Id: Ic8be34f394c3577d193e6a0b5cccd014d309fb9f
parent 9e4440d7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -21,12 +21,12 @@ import static android.app.ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;
import static android.app.ActivityManager.PROCESS_STATE_CACHED_EMPTY;
import static android.app.ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND;
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
import static android.app.ActivityManager.PROCESS_STATE_LAST_ACTIVITY;
import static android.app.ActivityManager.PROCESS_STATE_NONEXISTENT;
import static android.app.ActivityManager.PROCESS_STATE_RECEIVER;
import static android.app.ActivityManager.PROCESS_STATE_SERVICE;
import static android.app.ActivityManager.PROCESS_STATE_TOP;
import static android.app.ActivityManager.PROCESS_STATE_TRANSIENT_BACKGROUND;
import static android.util.DebugUtils.valueToString;

import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
@@ -199,8 +199,8 @@ public class ActivityManagerServiceTest {

        // Uid state is not moving from background to foreground or vice versa.
        verifySeqCounterAndInteractions(uidRec,
                PROCESS_STATE_IMPORTANT_BACKGROUND, // prevState
                PROCESS_STATE_IMPORTANT_FOREGROUND, // curState
                PROCESS_STATE_TRANSIENT_BACKGROUND, // prevState
                PROCESS_STATE_IMPORTANT_BACKGROUND, // curState
                42, // expectedGlobalCounter
                1, // exptectedCurProcStateSeq
                NETWORK_STATE_NO_CHANGE, // expectedBlockState