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

Commit 0df686d2 authored by eddy-sh.chen's avatar eddy-sh.chen
Browse files

Don't wait keyguard drawn if device has no keyguard

Instead, call finishKeyguardDrawn() if device has
no keyguard to avoid redundant waiting times.

Bug: 72972510
Change-Id: Id756de05691be2593fa06d3b55e5e24ad1ea7b19
parent 1c81aa63
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6791,7 +6791,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            mWindowManagerDrawComplete = false;
            mScreenOnListener = screenOnListener;

            if (mKeyguardDelegate != null) {
            if (mKeyguardDelegate != null && mKeyguardDelegate.hasKeyguard()) {
                mHandler.removeMessages(MSG_KEYGUARD_DRAWN_TIMEOUT);
                mHandler.sendEmptyMessageDelayed(MSG_KEYGUARD_DRAWN_TIMEOUT,
                        getKeyguardDrawnTimeout());
+4 −0
Original line number Diff line number Diff line
@@ -235,6 +235,10 @@ public class KeyguardServiceDelegate {
        return false;
    }

    public boolean hasKeyguard() {
        return mKeyguardState.deviceHasKeyguard;
    }

    public boolean isInputRestricted() {
        if (mKeyguardService != null) {
            mKeyguardState.inputRestricted = mKeyguardService.isInputRestricted();