From cac2a50465da090ca629f415d62e5173995bffba Mon Sep 17 00:00:00 2001 From: Issei Suzuki Date: Tue, 16 Apr 2019 16:52:50 +0200 Subject: Synchronize bubble activity rendering status and its visibility change. - Add an API ITaskStackListener.onSingleTaskDisplayDrawn() to notifity contents are drawn for the first time on a display which can only contain one task. - BubbleController updates contents visibility (actually alpha value) of the Surface in a ActivityView. Bug: 130442248 Test: atest WmTests:TaskStackChangedListenerTest Change-Id: Ie5aed373996419b059935889b564ca91c2e3cf23 --- core/java/android/app/ActivityView.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/java/android/app/ActivityView.java') diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java index 4771f9f6ad04..3bf659b663b0 100644 --- a/core/java/android/app/ActivityView.java +++ b/core/java/android/app/ActivityView.java @@ -120,6 +120,7 @@ public class ActivityView extends ViewGroup { mActivityTaskManager = ActivityTaskManager.getService(); mSurfaceView = new SurfaceView(context); + mSurfaceView.setAlpha(0f); mSurfaceCallback = new SurfaceCallback(); mSurfaceView.getHolder().addCallback(mSurfaceCallback); addView(mSurfaceView); @@ -346,6 +347,16 @@ public class ActivityView extends ViewGroup { mSurfaceView.layout(0 /* left */, 0 /* top */, r - l /* right */, b - t /* bottom */); } + @Override + public void setAlpha(float alpha) { + mSurfaceView.setAlpha(alpha); + } + + @Override + public float getAlpha() { + return mSurfaceView.getAlpha(); + } + @Override public boolean gatherTransparentRegion(Region region) { // The tap exclude region may be affected by any view on top of it, so we detect the -- cgit v1.2.3