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

Commit 5229ac08 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Automerger Merge Worker
Browse files

Merge "Call finishDrawing for Windows with visiblity GONE" into rvc-dev am:...

Merge "Call finishDrawing for Windows with visiblity GONE" into rvc-dev am: 2de92373 am: b11d7065 am: a3178b39 am: ea3a3310

Change-Id: I419b504468bd6930b5d6c5723465fd10c0f0867a
parents 35782280 ea3a3310
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2259,7 +2259,7 @@ public class WindowManagerService extends IWindowManager.Stub
            win.mRelayoutCalled = true;
            win.mInRelayout = true;

            win.mViewVisibility = viewVisibility;
            win.setViewVisibility(viewVisibility);
            ProtoLog.i(WM_DEBUG_SCREEN_ON,
                    "Relayout %s: oldVis=%d newVis=%d. %s", win, oldVisibility,
                            viewVisibility, new RuntimeException().fillInStackTrace());
+11 −0
Original line number Diff line number Diff line
@@ -5693,6 +5693,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return mSession.mPid == pid && isNonToastOrStarting() && isVisibleNow();
    }

    void setViewVisibility(int viewVisibility) {
        mViewVisibility = viewVisibility;
        // The viewVisibility is set to GONE with a client request to relayout. If this occurs and
        // there's a blast sync transaction waiting, finishDrawing will never be called since the
        // client will not render when visibility is GONE. Therefore, call finishDrawing here to
        // prevent system server from blocking on a window that will not draw.
        if (viewVisibility == View.GONE && mUsingBLASTSyncTransaction) {
            finishDrawing(null);
        }
    }

    SurfaceControl getClientViewRootSurface() {
        return mWinAnimator.getClientViewRootSurface();
    }