Loading packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class DozeMachine { mDozeService.requestWakeUp(); mDozeService.requestWakeUp(); } } private boolean isExecutingTransition() { public boolean isExecutingTransition() { return !mQueuedRequests.isEmpty(); return !mQueuedRequests.isEmpty(); } } Loading packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,14 @@ public class DozeTriggers implements DozeMachine.Part { } } private void onProximityFar(boolean far) { private void onProximityFar(boolean far) { // Proximity checks are asynchronous and the user might have interacted with the phone // when a new event is arriving. This means that a state transition might have happened // and the proximity check is now obsolete. if (mMachine.isExecutingTransition()) { Log.w(TAG, "onProximityFar called during transition. Ignoring sensor response."); return; } final boolean near = !far; final boolean near = !far; final DozeMachine.State state = mMachine.getState(); final DozeMachine.State state = mMachine.getState(); final boolean paused = (state == DozeMachine.State.DOZE_AOD_PAUSED); final boolean paused = (state == DozeMachine.State.DOZE_AOD_PAUSED); Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class DozeMachine { mDozeService.requestWakeUp(); mDozeService.requestWakeUp(); } } private boolean isExecutingTransition() { public boolean isExecutingTransition() { return !mQueuedRequests.isEmpty(); return !mQueuedRequests.isEmpty(); } } Loading
packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,14 @@ public class DozeTriggers implements DozeMachine.Part { } } private void onProximityFar(boolean far) { private void onProximityFar(boolean far) { // Proximity checks are asynchronous and the user might have interacted with the phone // when a new event is arriving. This means that a state transition might have happened // and the proximity check is now obsolete. if (mMachine.isExecutingTransition()) { Log.w(TAG, "onProximityFar called during transition. Ignoring sensor response."); return; } final boolean near = !far; final boolean near = !far; final DozeMachine.State state = mMachine.getState(); final DozeMachine.State state = mMachine.getState(); final boolean paused = (state == DozeMachine.State.DOZE_AOD_PAUSED); final boolean paused = (state == DozeMachine.State.DOZE_AOD_PAUSED); Loading