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

Commit 9018c0a9 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am f6dbd61b: Merge "Always layout Keyguard on config change." into jb-mr1-dev

* commit 'f6dbd61b':
  Always layout Keyguard on config change.
parents dcfe6cee f6dbd61b
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -1473,16 +1473,24 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return getNonDecorDisplayHeight(fullWidth, fullHeight, rotation);
    }

    @Override
    public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs) {
        return attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD;
    }

    @Override
    public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs) {
        return attrs.type != WindowManager.LayoutParams.TYPE_STATUS_BAR
                && attrs.type != WindowManager.LayoutParams.TYPE_NAVIGATION_BAR
                && attrs.type != WindowManager.LayoutParams.TYPE_WALLPAPER
                && attrs.type != WindowManager.LayoutParams.TYPE_DREAM
                && attrs.type != WindowManager.LayoutParams.TYPE_UNIVERSE_BACKGROUND;
        switch (attrs.type) {
            case TYPE_STATUS_BAR:
            case TYPE_NAVIGATION_BAR:
            case TYPE_WALLPAPER:
            case TYPE_DREAM:
            case TYPE_UNIVERSE_BACKGROUND:
            case TYPE_KEYGUARD:
                return false;
            default:
                return true;
        }
    }

    /** {@inheritDoc} */
+5 −12
Original line number Diff line number Diff line
@@ -2823,16 +2823,9 @@ public class WindowManagerService extends IWindowManager.Stub
                                "Relayout window turning screen on: " + win);
                        win.mTurnOnScreen = true;
                    }
                    int diff = 0;
                    if (win.mConfiguration != mCurConfiguration
                            && (win.mConfiguration == null
                                    || (diff=mCurConfiguration.diff(win.mConfiguration)) != 0)) {
                        win.mConfiguration = mCurConfiguration;
                        if (DEBUG_CONFIGURATION) {
                            Slog.i(TAG, "Window " + win + " visible with new config: "
                                    + win.mConfiguration + " / 0x"
                                    + Integer.toHexString(diff));
                        }
                    if (win.isConfigChanged()) {
                        if (DEBUG_CONFIGURATION) Slog.i(TAG, "Window " + win
                                + " visible with new config: " + win.mConfiguration);
                        outConfig.setTo(mCurConfiguration);
                    }
                }
@@ -8260,7 +8253,7 @@ public class WindowManagerService extends IWindowManager.Stub
                Slog.v(TAG, "1ST PASS " + win
                        + ": gone=" + gone + " mHaveFrame=" + win.mHaveFrame
                        + " mLayoutAttached=" + win.mLayoutAttached
                        + " screen changed=" + win.isConfigDiff(ActivityInfo.CONFIG_SCREEN_SIZE));
                        + " screen changed=" + win.isConfigChanged());
                final AppWindowToken atoken = win.mAppToken;
                if (gone) Slog.v(TAG, "  GONE: mViewVisibility="
                        + win.mViewVisibility + " mRelayoutCalled="
@@ -8282,7 +8275,7 @@ public class WindowManagerService extends IWindowManager.Stub
            // windows, since that means "perform layout as normal,
            // just don't display").
            if (!gone || !win.mHaveFrame || win.mLayoutNeeded
                    || win.isConfigDiff(ActivityInfo.CONFIG_SCREEN_SIZE)
                    || win.isConfigChanged()
                    || win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
                if (!win.mLayoutAttached) {
                    if (initial) {