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

Commit 14679247 authored by Danesh M's avatar Danesh M Committed by Gerrit Code Review
Browse files

WindowAnimator : Check KEYGUARD_PANEL when deciding to show/hide window

By default, if blur is enabled we don't hide the window behind since we
want the user to see it. This is not true for when a KEYGUARD_PANEL is active
since we can't see anything behind it anyway. Only apply blur logic
if KEYGUARD_PANEL is not added.

CYNGNOS-2980

Change-Id: Icecae14455d6e68665bb688e3f6dc4ea9d74e88c
parent 130c8937
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -664,6 +664,11 @@ public interface WindowManagerPolicy {
     */
    public WindowState getWinShowWhenLockedLw();

    /**
     * Returns the current keyguard panel, if such a thing exists.
     */
    public WindowState getWinKeyguardPanelLw();

    /**
     * Called when the system would like to show a UI to indicate that an
     * application is starting.  You can use this to add a
+5 −0
Original line number Diff line number Diff line
@@ -2698,6 +2698,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return mWinShowWhenLocked;
    }

    @Override
    public WindowState getWinKeyguardPanelLw() {
        return mKeyguardPanel;
    }

    /** {@inheritDoc} */
    @Override
    public View addStartingWindow(IBinder appToken, String packageName, int theme,
+8 −1
Original line number Diff line number Diff line
@@ -234,7 +234,14 @@ public class WindowAnimator {

        // Only hide windows if the keyguard is active and not animating away.
        boolean keyguardOn = mPolicy.isKeyguardShowingOrOccluded()
                && (mForceHiding != KEYGUARD_ANIMATING_OUT && !mKeyguardBlurEnabled);
                && mForceHiding != KEYGUARD_ANIMATING_OUT;

        final WindowState winKeyguardPanel = (WindowState) mPolicy.getWinKeyguardPanelLw();
        // If a keyguard panel is currently being shown, we should
        // continue to hide the windows as if blur is disabled.
        if (winKeyguardPanel == null) {
            keyguardOn &= !mKeyguardBlurEnabled;
        }
        return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
    }