Loading packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +2 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,8 @@ public class DozeMachine { Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE); break; case DOZE_PULSE_DONE: Preconditions.checkState(mState == State.DOZE_PULSING); Preconditions.checkState( mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING); break; default: break; Loading packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,16 @@ public class DozeMachineTest { mMachine.requestState(DOZE_PULSE_DONE); } @Test @UiThreadTest public void testSuppressingPulse_doesntCrash() { mMachine.requestState(INITIALIZED); mMachine.requestState(DOZE); mMachine.requestState(DOZE_REQUEST_PULSE); mMachine.requestState(DOZE_PULSE_DONE); } @Test @UiThreadTest public void testScreen_offInDoze() { Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +2 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,8 @@ public class DozeMachine { Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE); break; case DOZE_PULSE_DONE: Preconditions.checkState(mState == State.DOZE_PULSING); Preconditions.checkState( mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING); break; default: break; Loading
packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,16 @@ public class DozeMachineTest { mMachine.requestState(DOZE_PULSE_DONE); } @Test @UiThreadTest public void testSuppressingPulse_doesntCrash() { mMachine.requestState(INITIALIZED); mMachine.requestState(DOZE); mMachine.requestState(DOZE_REQUEST_PULSE); mMachine.requestState(DOZE_PULSE_DONE); } @Test @UiThreadTest public void testScreen_offInDoze() { Loading