Merge "Only create surface when showing window if it destroys it when hiding."

This commit is contained in:
Filip Gruszczynski
2015-11-25 19:09:21 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -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();
}

View File

@@ -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);