Loading packages/SystemUI/src/com/android/systemui/doze/DozeDockHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ public class DozeDockHandler implements DozeMachine.Part { } private void requestPulseOutNow(State dozeState) { if (dozeState == State.DOZE_REQUEST_PULSE || dozeState == State.DOZE_PULSING) { if (dozeState == State.DOZE_REQUEST_PULSE || dozeState == State.DOZE_PULSING || dozeState == State.DOZE_PULSING_BRIGHT) { final int pulseReason = mMachine.getPulseReason(); if (pulseReason == DozeLog.PULSE_REASON_DOCKING) { mDozeHost.stopPulsing(); Loading packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class DozeFactory { new DozeScreenState(wrappedService, handler, params, wakeLock), createDozeScreenBrightness(context, wrappedService, sensorManager, host, params, handler), new DozeWallpaperState(context, machine), new DozeWallpaperState(context), new DozeDockHandler(context, machine, host, config, handler, dockManager) }); Loading packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +5 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,11 @@ public interface DozeHost { boolean isProvisioned(); boolean isBlockingDoze(); void extendPulse(); /** * Makes a current pulse last for twice as long. * @param reason why we're extending it. */ void extendPulse(int reason); void setAnimateWakeup(boolean animateWakeup); void setAnimateScreenOff(boolean animateScreenOff); Loading packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +7 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ public class DozeMachine { DOZE_REQUEST_PULSE, /** Pulse is showing. Device is awake and showing UI. */ DOZE_PULSING, /** Pulse is showing with bright wallpaper. Device is awake and showing UI. */ DOZE_PULSING_BRIGHT, /** Pulse is done showing. Followed by transition to DOZE or DOZE_AOD. */ DOZE_PULSE_DONE, /** Doze is done. DozeService is finished. */ Loading @@ -84,6 +86,7 @@ public class DozeMachine { switch (this) { case DOZE_REQUEST_PULSE: case DOZE_PULSING: case DOZE_PULSING_BRIGHT: return true; default: return false; Loading @@ -101,6 +104,7 @@ public class DozeMachine { case DOZE: return Display.STATE_OFF; case DOZE_PULSING: case DOZE_PULSING_BRIGHT: return Display.STATE_ON; case DOZE_AOD: case DOZE_AOD_PAUSING: Loading Loading @@ -202,6 +206,7 @@ public class DozeMachine { Assert.isMainThread(); Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING || mState == State.DOZE_PULSING_BRIGHT || mState == State.DOZE_PULSE_DONE, "must be in pulsing state, but is " + mState); return mPulseReason; } Loading Loading @@ -283,7 +288,8 @@ public class DozeMachine { break; case DOZE_PULSE_DONE: Preconditions.checkState( mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING); mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING || mState == State.DOZE_PULSING_BRIGHT); break; default: break; Loading packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +14 −3 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ public class DozeTriggers implements DozeMachine.Part { } else if (isPickup) { gentleWakeUp(pulseReason); } else { mDozeHost.extendPulse(); mDozeHost.extendPulse(pulseReason); } }, sensorPerformedProxCheck || (mDockManager != null && mDockManager.isDocked()), pulseReason); Loading Loading @@ -212,7 +212,8 @@ public class DozeTriggers implements DozeMachine.Part { final boolean pausing = (state == DozeMachine.State.DOZE_AOD_PAUSING); final boolean aod = (state == DozeMachine.State.DOZE_AOD); if (state == DozeMachine.State.DOZE_PULSING) { if (state == DozeMachine.State.DOZE_PULSING || state == DozeMachine.State.DOZE_PULSING_BRIGHT) { boolean ignoreTouch = near; if (DEBUG) Log.i(TAG, "Prox changed, ignore touch = " + ignoreTouch); mDozeHost.onIgnoreTouchWhilePulsing(ignoreTouch); Loading Loading @@ -276,6 +277,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.setListening(false); break; case DOZE_PULSING: case DOZE_PULSING_BRIGHT: mDozeSensors.setTouchscreenSensorsListening(false); mDozeSensors.setProxListening(true); break; Loading Loading @@ -306,7 +308,16 @@ public class DozeTriggers implements DozeMachine.Part { private void requestPulse(final int reason, boolean performedProxCheck) { Assert.isMainThread(); mDozeHost.extendPulse(); mDozeHost.extendPulse(reason); // When already pulsing we're allowed to show the wallpaper directly without // requesting a new pulse. if (mMachine.getState() == DozeMachine.State.DOZE_PULSING && reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN) { mMachine.requestState(DozeMachine.State.DOZE_PULSING_BRIGHT); return; } if (mPulsePending || !mAllowPulseTriggers || !canPulse()) { if (mAllowPulseTriggers) { DozeLog.tracePulseDropped(mContext, mPulsePending, mMachine.getState(), Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeDockHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ public class DozeDockHandler implements DozeMachine.Part { } private void requestPulseOutNow(State dozeState) { if (dozeState == State.DOZE_REQUEST_PULSE || dozeState == State.DOZE_PULSING) { if (dozeState == State.DOZE_REQUEST_PULSE || dozeState == State.DOZE_PULSING || dozeState == State.DOZE_PULSING_BRIGHT) { final int pulseReason = mMachine.getPulseReason(); if (pulseReason == DozeLog.PULSE_REASON_DOCKING) { mDozeHost.stopPulsing(); Loading
packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class DozeFactory { new DozeScreenState(wrappedService, handler, params, wakeLock), createDozeScreenBrightness(context, wrappedService, sensorManager, host, params, handler), new DozeWallpaperState(context, machine), new DozeWallpaperState(context), new DozeDockHandler(context, machine, host, config, handler, dockManager) }); Loading
packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +5 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,11 @@ public interface DozeHost { boolean isProvisioned(); boolean isBlockingDoze(); void extendPulse(); /** * Makes a current pulse last for twice as long. * @param reason why we're extending it. */ void extendPulse(int reason); void setAnimateWakeup(boolean animateWakeup); void setAnimateScreenOff(boolean animateScreenOff); Loading
packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +7 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ public class DozeMachine { DOZE_REQUEST_PULSE, /** Pulse is showing. Device is awake and showing UI. */ DOZE_PULSING, /** Pulse is showing with bright wallpaper. Device is awake and showing UI. */ DOZE_PULSING_BRIGHT, /** Pulse is done showing. Followed by transition to DOZE or DOZE_AOD. */ DOZE_PULSE_DONE, /** Doze is done. DozeService is finished. */ Loading @@ -84,6 +86,7 @@ public class DozeMachine { switch (this) { case DOZE_REQUEST_PULSE: case DOZE_PULSING: case DOZE_PULSING_BRIGHT: return true; default: return false; Loading @@ -101,6 +104,7 @@ public class DozeMachine { case DOZE: return Display.STATE_OFF; case DOZE_PULSING: case DOZE_PULSING_BRIGHT: return Display.STATE_ON; case DOZE_AOD: case DOZE_AOD_PAUSING: Loading Loading @@ -202,6 +206,7 @@ public class DozeMachine { Assert.isMainThread(); Preconditions.checkState(mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING || mState == State.DOZE_PULSING_BRIGHT || mState == State.DOZE_PULSE_DONE, "must be in pulsing state, but is " + mState); return mPulseReason; } Loading Loading @@ -283,7 +288,8 @@ public class DozeMachine { break; case DOZE_PULSE_DONE: Preconditions.checkState( mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING); mState == State.DOZE_REQUEST_PULSE || mState == State.DOZE_PULSING || mState == State.DOZE_PULSING_BRIGHT); break; default: break; Loading
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +14 −3 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ public class DozeTriggers implements DozeMachine.Part { } else if (isPickup) { gentleWakeUp(pulseReason); } else { mDozeHost.extendPulse(); mDozeHost.extendPulse(pulseReason); } }, sensorPerformedProxCheck || (mDockManager != null && mDockManager.isDocked()), pulseReason); Loading Loading @@ -212,7 +212,8 @@ public class DozeTriggers implements DozeMachine.Part { final boolean pausing = (state == DozeMachine.State.DOZE_AOD_PAUSING); final boolean aod = (state == DozeMachine.State.DOZE_AOD); if (state == DozeMachine.State.DOZE_PULSING) { if (state == DozeMachine.State.DOZE_PULSING || state == DozeMachine.State.DOZE_PULSING_BRIGHT) { boolean ignoreTouch = near; if (DEBUG) Log.i(TAG, "Prox changed, ignore touch = " + ignoreTouch); mDozeHost.onIgnoreTouchWhilePulsing(ignoreTouch); Loading Loading @@ -276,6 +277,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.setListening(false); break; case DOZE_PULSING: case DOZE_PULSING_BRIGHT: mDozeSensors.setTouchscreenSensorsListening(false); mDozeSensors.setProxListening(true); break; Loading Loading @@ -306,7 +308,16 @@ public class DozeTriggers implements DozeMachine.Part { private void requestPulse(final int reason, boolean performedProxCheck) { Assert.isMainThread(); mDozeHost.extendPulse(); mDozeHost.extendPulse(reason); // When already pulsing we're allowed to show the wallpaper directly without // requesting a new pulse. if (mMachine.getState() == DozeMachine.State.DOZE_PULSING && reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN) { mMachine.requestState(DozeMachine.State.DOZE_PULSING_BRIGHT); return; } if (mPulsePending || !mAllowPulseTriggers || !canPulse()) { if (mAllowPulseTriggers) { DozeLog.tracePulseDropped(mContext, mPulsePending, mMachine.getState(), Loading