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
This commit is contained in:
Robert Carr
2019-04-01 15:27:26 -07:00
parent 82ccc59370
commit 57f026191e

View File

@@ -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 {