Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b993a3a0 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "AOD: Do not change wakeup animation during DozeService teardown" into oc-dr1-dev

am: e8107cf3

Change-Id: I2042c1d15844e34929286e91283ddb9942faea8f
parents f74c2a6f e8107cf3
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -95,17 +95,22 @@ public class DozeUi implements DozeMachine.Part {
                unscheduleTimeTick();
                break;
        }
        mHost.setAnimateWakeup(shouldAnimateWakeup(newState));
        updateAnimateWakeup(newState);
    }

    private boolean shouldAnimateWakeup(DozeMachine.State state) {
    private void updateAnimateWakeup(DozeMachine.State state) {
        switch (state) {
            case DOZE_REQUEST_PULSE:
            case DOZE_PULSING:
            case DOZE_PULSE_DONE:
                return true;
                mHost.setAnimateWakeup(true);
                break;
            case FINISH:
                // Keep current state.
                break;
            default:
                return false;
                mHost.setAnimateWakeup(false);
                break;
        }
    }