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

Commit 89f575b6 authored by Tony Mak's avatar Tony Mak Committed by Android (Google) Code Review
Browse files

Merge "No keyguard should be shown after reboot if it is in kiosk mode"

parents 8c119d84 2c0d6dcc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1133,6 +1133,11 @@ public interface WindowManagerPolicy {
     */
    public boolean isKeyguardShowingOrOccluded();

    /**
     * @return true if in keyguard is on and not occluded.
     */
    public boolean isKeyguardShowingAndNotOccluded();

    /**
     * inKeyguardRestrictedKeyInputMode
     *
+2 −1
Original line number Diff line number Diff line
@@ -6270,7 +6270,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    private boolean isKeyguardShowingAndNotOccluded() {
    @Override
    public boolean isKeyguardShowingAndNotOccluded() {
        if (mKeyguardDelegate == null) return false;
        return mKeyguardDelegate.isShowing() && !mKeyguardOccluded;
    }
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ public class KeyguardServiceDelegate {
            showingAndNotOccluded = true;
            secure = true;
            deviceHasKeyguard = true;
            enabled = true;
        }
        boolean showing;
        boolean showingAndNotOccluded;
@@ -177,6 +178,9 @@ public class KeyguardServiceDelegate {
            if (mKeyguardState.occluded) {
                mKeyguardService.setOccluded(mKeyguardState.occluded);
            }
            if (!mKeyguardState.enabled) {
                mKeyguardService.setKeyguardEnabled(mKeyguardState.enabled);
            }
        }

        @Override
+1 −1
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ public class WindowAnimator {
                    continue;
                }
                final WindowStateAnimator winAnimator = win.mWinAnimator;
                if ((win.mAttrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) {
                if (mPolicy.isKeyguardShowingAndNotOccluded()) {
                    if (!winAnimator.mAnimating) {
                        if (DEBUG_KEYGUARD) Slog.d(TAG,
                                "updateWindowsLocked: creating delay animation");