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

Commit 4c3d44e8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use @DisableFlags instead of @RequiresFlagsDisabled" into main

parents 69a939ef d142a099
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import static org.mockito.Mockito.when;

import android.app.ActivityManager;
import android.hardware.display.AmbientDisplayConfiguration;
import android.platform.test.annotations.RequiresFlagsDisabled;
import android.platform.test.annotations.DisableFlags;

import androidx.test.annotation.UiThreadTest;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -124,7 +124,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testSuspendTriggersDoze_carMode() {
        // GIVEN car mode
        mDozeSuppressor.onUiModeTypeChanged(UI_MODE_TYPE_CAR);
@@ -139,7 +139,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testSuspendTriggersDoze_enterCarMode() {
        // GIVEN currently dozing
        mDozeSuppressor.transitionTo(UNINITIALIZED, INITIALIZED);
@@ -153,7 +153,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testDozeResume_exitCarMode() {
        // GIVEN currently suspended, with AOD not enabled
        mDozeSuppressor.onUiModeTypeChanged(UI_MODE_TYPE_CAR);
@@ -169,7 +169,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testDozeAoDResume_exitCarMode() {
        // GIVEN currently suspended, with AOD not enabled
        mDozeSuppressor.onUiModeTypeChanged(UI_MODE_TYPE_CAR);
@@ -185,7 +185,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testUiModeDoesNotChange_noStateTransition() {
        mDozeSuppressor.transitionTo(UNINITIALIZED, INITIALIZED);
        clearInvocations(mDozeMachine);
@@ -200,7 +200,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testUiModeTypeChange_whenDozeMachineIsNotReady_doesNotDoAnything() {
        when(mDozeMachine.isUninitializedOrFinished()).thenReturn(true);

@@ -210,7 +210,7 @@ public class DozeSuppressorTest extends SysuiTestCase {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    @DisableFlags(Flags.FLAG_REMOVE_AOD_CAR_MODE)
    public void testUiModeTypeChange_CarModeEnabledAndDozeMachineNotReady_suspendsTriggersAfter() {
        when(mDozeMachine.isUninitializedOrFinished()).thenReturn(true);
        mDozeSuppressor.onUiModeTypeChanged(UI_MODE_TYPE_CAR);