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

Commit 2df228c3 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix all issues with SystemUI visibility and transitions

- Use win.isVisible again to determine top opaque full screen
window. !goneForLayout isn't really correct as windows that are
just about to draw can already influence SystemUI flags
- Don't coalesce messages in CommandQueue. This messes up ordering!
Bad!

Test: Unlock to Settings
Test: Navigate around in settings, make sure no flashes
Test: Cold launch United app
Test: Go to recents <-> settings 10 times

Change-Id: I15d37b35344d955c45591386182c5266bba74f01
Fixes: 37926053
Fixes: 37433095
Fixes: 37923474
parent d70695ee
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -341,14 +341,12 @@ public class CommandQueue extends IStatusBar.Stub {

    public void appTransitionPending(boolean forced) {
        synchronized (mLock) {
            mHandler.removeMessages(MSG_APP_TRANSITION_PENDING);
            mHandler.obtainMessage(MSG_APP_TRANSITION_PENDING, forced ? 1 : 0, 0).sendToTarget();
        }
    }

    public void appTransitionCancelled() {
        synchronized (mLock) {
            mHandler.removeMessages(MSG_APP_TRANSITION_CANCELLED);
            mHandler.sendEmptyMessage(MSG_APP_TRANSITION_CANCELLED);
        }
    }
@@ -359,7 +357,6 @@ public class CommandQueue extends IStatusBar.Stub {

    public void appTransitionStarting(long startTime, long duration, boolean forced) {
        synchronized (mLock) {
            mHandler.removeMessages(MSG_APP_TRANSITION_STARTING);
            mHandler.obtainMessage(MSG_APP_TRANSITION_STARTING, forced ? 1 : 0, 0,
                    Pair.create(startTime, duration)).sendToTarget();
        }
@@ -368,7 +365,6 @@ public class CommandQueue extends IStatusBar.Stub {
    @Override
    public void appTransitionFinished() {
        synchronized (mLock) {
            mHandler.removeMessages(MSG_APP_TRANSITION_FINISHED);
            mHandler.sendEmptyMessage(MSG_APP_TRANSITION_FINISHED);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -5325,7 +5325,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    @Override
    public void applyPostLayoutPolicyLw(WindowState win, WindowManager.LayoutParams attrs,
            WindowState attached, WindowState imeTarget) {
        final boolean visible = !win.isGoneForLayoutLw() && win.getAttrs().alpha > 0f;
        final boolean visible = win.isVisibleLw() && win.getAttrs().alpha > 0f;
        if (DEBUG_LAYOUT) Slog.i(TAG, "Win " + win + ": isVisible=" + visible);
        applyKeyguardPolicyLw(win, imeTarget);
        final int fl = PolicyControl.getWindowFlags(win, attrs);