Merge "Fix the visibility of SurfaceView in InlineContentView." into rvc-dev
diff --git a/core/java/android/widget/inline/InlineContentView.java b/core/java/android/widget/inline/InlineContentView.java
index 1b666aa..9712311 100644
--- a/core/java/android/widget/inline/InlineContentView.java
+++ b/core/java/android/widget/inline/InlineContentView.java
@@ -21,8 +21,8 @@
import android.annotation.TestApi;
import android.content.Context;
import android.graphics.PixelFormat;
-import android.graphics.Rect;
import android.graphics.PointF;
+import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
import android.view.SurfaceControl;
@@ -156,7 +156,8 @@
@Override
public void onDraw() {
computeParentPositionAndScale();
- mSurfaceView.setVisibility(VISIBLE);
+ final int visibility = InlineContentView.this.isShown() ? VISIBLE : GONE;
+ mSurfaceView.setVisibility(visibility);
}
};