Home
last modified time | relevance | path

Searched refs:mMachine (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeMachineTest.java76 DozeMachine mMachine; field in DozeMachineTest
106 mMachine = new DozeMachine(mServiceFake, in setUp()
119 mMachine.requestState(INITIALIZED); in testInitialize_initializesParts()
128 mMachine.requestState(INITIALIZED); in testInitialize_goesToDoze()
131 assertEquals(DOZE, mMachine.getState()); in testInitialize_goesToDoze()
138 mMachine.requestState(INITIALIZED); in testInitialize_goesToAod()
141 assertEquals(DOZE_AOD, mMachine.getState()); in testInitialize_goesToAod()
148 mMachine.requestState(INITIALIZED); in testInitialize_afterDocked_goesToDockedAod()
151 assertEquals(DOZE_AOD_DOCKED, mMachine.getState()); in testInitialize_afterDocked_goesToDockedAod()
160 mMachine.requestState(INITIALIZED); in testInitialize_afterDockPaused_goesToDoze()
[all …]
DDozeDockHandlerTest.java52 @Mock private DozeMachine mMachine; field in DozeDockHandlerTest
64 mDockHandler.setDozeMachine(mMachine); in setUp()
66 when(mMachine.isExecutingTransition()).thenReturn(false); in setUp()
68 when(mMachine.getState()).thenReturn(State.DOZE_AOD); in setUp()
89 verify(mMachine).requestState(eq(State.DOZE_AOD_DOCKED)); in onEvent_docked_requestsDockedAodState()
96 verify(mMachine, never()).requestState(eq(State.DOZE_AOD)); in onEvent_noneWhileEnabledAod_ignoresIfAlreadyNone()
102 clearInvocations(mMachine); in onEvent_noneWhileEnabledAod_requestsAodState()
105 verify(mMachine).requestState(eq(State.DOZE_AOD)); in onEvent_noneWhileEnabledAod_requestsAodState()
111 clearInvocations(mMachine); in onEvent_noneWhileDisabledAod_requestsDozeState()
116 verify(mMachine).requestState(eq(State.DOZE)); in onEvent_noneWhileDisabledAod_requestsDozeState()
[all …]
DDozeTriggersTest.java88 private DozeMachine mMachine; field in DozeTriggersTest
149 mTriggers.setDozeMachine(mMachine); in setupDozeTriggers()
155 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck()
161 clearInvocations(mMachine); in testOnNotification_stillWorksAfterOneFailedProxCheck()
173 verify(mMachine, never()).requestState(any()); in testOnNotification_stillWorksAfterOneFailedProxCheck()
174 verify(mMachine, never()).requestPulse(anyInt()); in testOnNotification_stillWorksAfterOneFailedProxCheck()
181 verify(mMachine).requestPulse(anyInt()); in testOnNotification_stillWorksAfterOneFailedProxCheck()
188 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_startsPulseRequest()
192 clearInvocations(mMachine); in testOnNotification_startsPulseRequest()
207 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_cannotPulse_notificationSuppressed()
[all …]
DDozeUiTest.java63 private DozeMachine mMachine; field in DozeUiTest
89 mDozeUi.setDozeMachine(mMachine); in setUp()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeSuppressor.java55 private DozeMachine mMachine; field in DozeSuppressor
87 if (mMachine.isUninitializedOrFinished()) { in onUiModeTypeChanged()
99 mMachine = dozeMachine; in setDozeMachine()
138 mMachine.requestState(DozeMachine.State.FINISH); in checkShouldImmediatelyEndDoze()
154 mMachine.requestState(mConfig.alwaysOnEnabled(mUserTracker.getUserId()) in handleCarModeExited()
160 mMachine.requestState(DozeMachine.State.DOZE_SUSPEND_TRIGGERS); in handleCarModeStarted()
171 } else if (mMachine.getState() == DozeMachine.State.DOZE
178 mMachine.requestState(nextState);
193 mMachine.requestState(nextState);
DDozeDockHandler.java41 private DozeMachine mMachine; field in DozeDockHandler
59 mMachine = dozeMachine; in setDozeMachine()
96 if (mMachine.isExecutingTransition() || isPulsing()) { in onEvent()
119 mMachine.requestState(nextState); in onEvent()
123 DozeMachine.State state = mMachine.getState(); in isPulsing()
DDozePauser.java35 private DozeMachine mMachine; field in DozePauser
47 mMachine = dozeMachine; in setDozeMachine()
64 mMachine.requestState(DozeMachine.State.DOZE_AOD_PAUSED); in onTimeout()
DDozeTriggers.java90 private DozeMachine mMachine; field in DozeTriggers
234 mMachine = dozeMachine; in setDozeMachine()
317 mMachine.isExecutingTransition() ? null : mMachine.getState(), in onSensor()
344 if (canPulse(mMachine.getState(), true)) { in onSensor()
386 mMachine.wakeUp(reason);
393 if (mMachine.isExecutingTransition()) { in onProximityFar()
399 final DozeMachine.State state = mMachine.getState(); in onProximityFar()
412 mMachine.requestState(DozeMachine.State.DOZE_AOD); in onProximityFar()
415 mMachine.requestState(DozeMachine.State.DOZE_AOD_PAUSING); in onProximityFar()
436 mMachine.requestState(DozeMachine.State.DOZE_AOD); in onWakeScreen()
[all …]
DDozeUi.java52 private DozeMachine mMachine; field in DozeUi
97 mMachine = dozeMachine; in setDozeMachine()
106 mMachine.requestState( in pulseWhileDozing()
119 mMachine.requestState(DozeMachine.State.DOZE_PULSE_DONE); in pulseWhileDozing()
148 pulseWhileDozing(mMachine.getPulseReason()); in transitionTo()