summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorRobert Carr <racarr@google.com>2019-04-01 15:27:26 -0700
committerRobert Carr <racarr@google.com>2019-04-01 15:27:26 -0700
commit57f026191ef61470eb433b52994b20c4efea8db4 (patch)
tree985f9b9e4c719b1e028784f37ce7e9f0c1e47266 /core/java/android
parent82ccc5937078ea62963f9ff14604e088df791996 (diff)
SurfaceView: Correct comparison operator.
We show the background when the Surface view is BEHIND not when it is in front. Bug: 129359905 Test: SurfaceViewSurfaceValidatorTest#testOnTopHasNoBackground Change-Id: I3f3139d50972626e4c70139f1008d70d2935cd0b
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/SurfaceView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index e931448652c0..8070e76d1b40 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -491,7 +491,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb
if (mBackgroundControl == null) {
return;
}
- if ((mSubLayer > 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0)) {
+ if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0)) {
mBackgroundControl.show();
mBackgroundControl.setLayer(Integer.MIN_VALUE);
} else {