summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2017-07-07 03:29:48 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-07 03:29:48 +0000
commit8ac26e84bc730cb3cd356fcaef0fe96d60ee6bad (patch)
tree82a99ae83e54ddd83009ce957262001c7ad4e48e
parentb8d185f2b51f602c8526a80d9a756967af44b1d2 (diff)
parent5482790a3fece161b149cab8c61cf391e1e91247 (diff)
Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev am: 401b8907d0
am: 5482790a3f Change-Id: If186deb432621b5ce819ab9789b9dd57e324b440
-rw-r--r--core/java/android/view/SurfaceView.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index b035b7fd53ed..a19f05c6ae38 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -491,10 +491,10 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
if (myHeight <= 0) myHeight = getHeight();
final boolean formatChanged = mFormat != mRequestedFormat;
- final boolean creating = (mSurfaceControl == null || formatChanged)
+ final boolean visibleChanged = mVisible != mRequestedVisible;
+ final boolean creating = (mSurfaceControl == null || formatChanged || visibleChanged)
&& mRequestedVisible;
final boolean sizeChanged = mSurfaceWidth != myWidth || mSurfaceHeight != myHeight;
- final boolean visibleChanged = mVisible != mRequestedVisible;
final boolean windowVisibleChanged = mWindowVisibility != mLastWindowVisibility;
boolean redrawNeeded = false;