diff options
| author | Robert Carr <racarr@google.com> | 2019-04-01 15:27:26 -0700 |
|---|---|---|
| committer | Robert Carr <racarr@google.com> | 2019-04-01 15:27:26 -0700 |
| commit | 57f026191ef61470eb433b52994b20c4efea8db4 (patch) | |
| tree | 985f9b9e4c719b1e028784f37ce7e9f0c1e47266 /core/java/android | |
| parent | 82ccc5937078ea62963f9ff14604e088df791996 (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.java | 2 |
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 { |
