Home
last modified time | relevance | path

Searched refs:DozeMachine (Results 1 – 25 of 26) sorted by relevance

12

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeDockHandlerTest.java43 import com.android.systemui.doze.DozeMachine.State;
55 private DozeMachine mMachine;
70 mMachine = mock(DozeMachine.class); in setUp()
82 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testDockEventListener_registerAndUnregister()
86 mDockHandler.transitionTo(DozeMachine.State.DOZE, DozeMachine.State.FINISH); in testDockEventListener_registerAndUnregister()
93 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedWhenDoze_requestPulse()
94 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnEvent_dockedWhenDoze_requestPulse()
103 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedWhenDozeAoD_requestPulse()
104 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE_AOD); in testOnEvent_dockedWhenDozeAoD_requestPulse()
113 mDockHandler.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnEvent_dockedHideWhenPulsing_requestPulseOut()
[all …]
DDozeWallpaperStateTest.java64 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testDreamNotification()
65 DozeMachine.State.DOZE_AOD); in testDreamNotification()
67 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testDreamNotification()
72 mDozeWallpaperState.transitionTo(DozeMachine.State.FINISH, DozeMachine.State.DOZE_AOD); in testDreamNotification()
83 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testAnimates_whenSupported()
84 DozeMachine.State.DOZE_AOD); in testAnimates_whenSupported()
88 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testAnimates_whenSupported()
100 mDozeWallpaperState.transitionTo(DozeMachine.State.UNINITIALIZED, in testDoesNotAnimate_whenNotSupported()
101 DozeMachine.State.DOZE_AOD); in testDoesNotAnimate_whenNotSupported()
104 mDozeWallpaperState.transitionTo(DozeMachine.State.DOZE_AOD, DozeMachine.State.FINISH); in testDoesNotAnimate_whenNotSupported()
[all …]
DDozeTriggersTest.java56 private DozeMachine mMachine;
74 mMachine = mock(DozeMachine.class); in setUp()
91 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck()
93 mTriggers.transitionTo(DozeMachine.State.UNINITIALIZED, DozeMachine.State.INITIALIZED); in testOnNotification_stillWorksAfterOneFailedProxCheck()
94 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testOnNotification_stillWorksAfterOneFailedProxCheck()
111 when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors()
113 mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE); in testTransitionTo_disablesAndEnablesTouchSensors()
117 mTriggers.transitionTo(DozeMachine.State.DOZE, in testTransitionTo_disablesAndEnablesTouchSensors()
118 DozeMachine.State.DOZE_REQUEST_PULSE); in testTransitionTo_disablesAndEnablesTouchSensors()
119 mTriggers.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE, in testTransitionTo_disablesAndEnablesTouchSensors()
[all …]
DDozeMachineTest.java19 import static com.android.systemui.doze.DozeMachine.State.DOZE;
20 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD;
21 import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSE_DONE;
22 import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSING;
23 import static com.android.systemui.doze.DozeMachine.State.DOZE_REQUEST_PULSE;
24 import static com.android.systemui.doze.DozeMachine.State.FINISH;
25 import static com.android.systemui.doze.DozeMachine.State.INITIALIZED;
26 import static com.android.systemui.doze.DozeMachine.State.UNINITIALIZED;
63 DozeMachine mMachine;
70 private DozeMachine.Part mPartMock;
[all …]
DDozeScreenBrightnessTest.java19 import static com.android.systemui.doze.DozeMachine.State.DOZE;
20 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD;
21 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSED;
22 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSING;
23 import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSE_DONE;
24 import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSING;
25 import static com.android.systemui.doze.DozeMachine.State.DOZE_REQUEST_PULSE;
26 import static com.android.systemui.doze.DozeMachine.State.FINISH;
27 import static com.android.systemui.doze.DozeMachine.State.INITIALIZED;
28 import static com.android.systemui.doze.DozeMachine.State.UNINITIALIZED;
DDozeScreenStateTest.java19 import static com.android.systemui.doze.DozeMachine.State.DOZE;
20 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD;
21 import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSING;
22 import static com.android.systemui.doze.DozeMachine.State.DOZE_REQUEST_PULSE;
23 import static com.android.systemui.doze.DozeMachine.State.FINISH;
24 import static com.android.systemui.doze.DozeMachine.State.INITIALIZED;
25 import static com.android.systemui.doze.DozeMachine.State.UNINITIALIZED;
DDozeUiTest.java19 import static com.android.systemui.doze.DozeMachine.State.DOZE;
20 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD;
21 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSED;
22 import static com.android.systemui.doze.DozeMachine.State.INITIALIZED;
23 import static com.android.systemui.doze.DozeMachine.State.UNINITIALIZED;
61 private DozeMachine mMachine;
DDozeScreenStatePreventingAdapterTest.java38 private DozeMachine.Service mInner;
43 mInner = mock(DozeMachine.Service.class); in setup()
DDozeSuspendScreenStatePreventingAdapterTest.java38 private DozeMachine.Service mInner;
43 mInner = mock(DozeMachine.Service.class); in setup()
DDozeServiceFake.java27 public class DozeServiceFake implements DozeMachine.Service {
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeScreenState.java30 public class DozeScreenState implements DozeMachine.Part {
47 private final DozeMachine.Service mDozeService;
55 public DozeScreenState(DozeMachine.Service service, Handler handler, in DozeScreenState()
64 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
67 if (newState == DozeMachine.State.FINISH) { in transitionTo()
83 boolean pulseEnding = oldState == DozeMachine.State.DOZE_PULSE_DONE in transitionTo()
84 && newState == DozeMachine.State.DOZE_AOD; in transitionTo()
85 boolean turningOn = (oldState == DozeMachine.State.DOZE_AOD_PAUSED in transitionTo()
86 || oldState == DozeMachine.State.DOZE) && newState == DozeMachine.State.DOZE_AOD; in transitionTo()
87 boolean justInitialized = oldState == DozeMachine.State.INITIALIZED; in transitionTo()
[all …]
DDozeTriggers.java56 public class DozeTriggers implements DozeMachine.Part {
71 private final DozeMachine mMachine;
90 public DozeTriggers(Context context, DozeMachine machine, DozeHost dozeHost, in DozeTriggers()
111 if (DozeMachine.DEBUG) { in onNotification()
231 final DozeMachine.State state = mMachine.getState();
232 final boolean paused = (state == DozeMachine.State.DOZE_AOD_PAUSED);
233 final boolean pausing = (state == DozeMachine.State.DOZE_AOD_PAUSING);
234 final boolean aod = (state == DozeMachine.State.DOZE_AOD);
236 if (state == DozeMachine.State.DOZE_PULSING
237 || state == DozeMachine.State.DOZE_PULSING_BRIGHT) {
[all …]
DDozeUi.java19 import static com.android.systemui.doze.DozeMachine.State.DOZE;
20 import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSED;
41 public class DozeUi implements DozeMachine.Part {
48 private final DozeMachine mMachine;
66 public DozeUi(Context context, AlarmManager alarmManager, DozeMachine machine, in DozeUi()
101 ? DozeMachine.State.DOZE_PULSING_BRIGHT in pulseWhileDozing()
102 : DozeMachine.State.DOZE_PULSING); in pulseWhileDozing()
112 mMachine.requestState(DozeMachine.State.DOZE_PULSE_DONE); in pulseWhileDozing()
118 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
153 private void updateAnimateWakeup(DozeMachine.State state) { in updateAnimateWakeup()
[all …]
DDozePauser.java27 public class DozePauser implements DozeMachine.Part {
30 private final DozeMachine mMachine;
33 public DozePauser(Handler handler, DozeMachine machine, AlarmManager alarmManager, in DozePauser()
41 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
54 mMachine.requestState(DozeMachine.State.DOZE_AOD_PAUSED); in onTimeout()
DDozeAuthRemover.java26 public class DozeAuthRemover implements DozeMachine.Part {
35 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
36 if (newState == DozeMachine.State.DOZE || newState == DozeMachine.State.DOZE_AOD) { in transitionTo()
DDozeFactory.java47 public DozeMachine assembleMachine(DozeService dozeService, FalsingManager falsingManager) { in assembleMachine()
61 DozeMachine.Service wrappedService = dozeService; in assembleMachine()
67 DozeMachine machine = new DozeMachine(wrappedService, config, wakeLock, in assembleMachine()
69 machine.setParts(new DozeMachine.Part[]{ in assembleMachine()
86 private DozeMachine.Part createDozeScreenBrightness(Context context, in createDozeScreenBrightness()
87 DozeMachine.Service service, SensorManager sensorManager, DozeHost host, in createDozeScreenBrightness()
97 DozeParameters params, Handler handler, WakeLock wakeLock, DozeMachine machine, in createDozeTriggers()
104 private DozeMachine.Part createDozeUi(Context context, DozeHost host, WakeLock wakeLock, in createDozeUi()
105 DozeMachine machine, Handler handler, AlarmManager alarmManager, in createDozeUi()
DDozeDockHandler.java26 import com.android.systemui.doze.DozeMachine.State;
33 public class DozeDockHandler implements DozeMachine.Part {
38 private final DozeMachine mMachine;
48 public DozeDockHandler(Context context, DozeMachine machine, DozeHost dozeHost, in DozeDockHandler()
58 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
116 final DozeMachine.State dozeState = mMachine.getState(); in onEvent()
DDozeFalsingManagerAdapter.java24 public class DozeFalsingManagerAdapter implements DozeMachine.Part {
33 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
37 private boolean isAodMode(DozeMachine.State state) { in isAodMode()
DDozeScreenBrightness.java38 public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachine.Part,
47 private final DozeMachine.Service mDozeService;
71 public DozeScreenBrightness(Context context, DozeMachine.Service service, in DozeScreenBrightness()
94 public DozeScreenBrightness(Context context, DozeMachine.Service service, in DozeScreenBrightness()
104 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
121 if (newState != DozeMachine.State.FINISH) { in transitionTo()
122 setScreenOff(newState == DozeMachine.State.DOZE); in transitionTo()
123 setPaused(newState == DozeMachine.State.DOZE_AOD_PAUSED); in transitionTo()
DDozeSuspendScreenStatePreventingAdapter.java28 public class DozeSuspendScreenStatePreventingAdapter extends DozeMachine.Service.Delegate {
31 DozeSuspendScreenStatePreventingAdapter(DozeMachine.Service inner) { in DozeSuspendScreenStatePreventingAdapter()
47 public static DozeMachine.Service wrapIfNeeded(DozeMachine.Service inner, in wrapIfNeeded()
DDozeScreenStatePreventingAdapter.java28 public class DozeScreenStatePreventingAdapter extends DozeMachine.Service.Delegate {
31 DozeScreenStatePreventingAdapter(DozeMachine.Service inner) { in DozeScreenStatePreventingAdapter()
49 public static DozeMachine.Service wrapIfNeeded(DozeMachine.Service inner, in wrapIfNeeded()
DDozeService.java38 implements DozeMachine.Service, RequestDoze, PluginListener<DozeServicePlugin> {
42 private DozeMachine mDozeMachine;
93 mDozeMachine.requestState(DozeMachine.State.INITIALIZED); in onDreamingStarted()
103 mDozeMachine.requestState(DozeMachine.State.FINISH); in onDreamingStopped()
127 mDozeMachine.requestState(DozeMachine.State.DOZE_AOD); in onRequestShowDoze()
134 mDozeMachine.requestState(DozeMachine.State.DOZE); in onRequestHideDoze()
DDozeWallpaperState.java36 public class DozeWallpaperState implements DozeMachine.Part {
64 public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) { in transitionTo()
84 boolean wakingUpFromPulse = oldState == DozeMachine.State.DOZE_PULSING in transitionTo()
85 && newState == DozeMachine.State.FINISH; in transitionTo()
DDozeBrightnessHostForwarder.java22 public class DozeBrightnessHostForwarder extends DozeMachine.Service.Delegate {
26 public DozeBrightnessHostForwarder(DozeMachine.Service wrappedService, DozeHost host) { in DozeBrightnessHostForwarder()
DDozeLog.java177 public static void traceState(DozeMachine.State state) { in traceState()
257 DozeMachine.State state, boolean blocked) { in tracePulseDropped()

12