Merge "Only create surface when showing window if it destroys it when hiding."
This commit is contained in:
committed by
Android (Google) Code Review
commit
687789bebf
@@ -106,6 +106,7 @@ public final class InputWindowHandle {
|
||||
.append(", frame=[").append(frameLeft).append(",").append(frameTop).append(",")
|
||||
.append(frameRight).append(",").append(frameBottom).append("]")
|
||||
.append(", touchableRegion=").append(touchableRegion)
|
||||
.append(", visible=").append(visible)
|
||||
.toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -1605,8 +1605,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
// Already showing.
|
||||
return false;
|
||||
}
|
||||
if (!mHasSurface) {
|
||||
mDestroying = false;
|
||||
if (!mHasSurface && mDestroySurfaceWhenHidden) {
|
||||
// This is a window that doesn't retain the surface when it's hidden, so immediately
|
||||
// when we want to show it again, we need to create the surface for it.
|
||||
mWinAnimator.createSurfaceLocked();
|
||||
}
|
||||
if (DEBUG_VISIBILITY) Slog.v(TAG, "Policy visibility true: " + this);
|
||||
|
||||
Reference in New Issue
Block a user