Merge "Call finishDrawing for Windows with visiblity GONE" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2de9237362
@@ -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());
|
||||
|
||||
@@ -5689,6 +5689,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user