Loading core/java/android/app/ActivityView.java +15 −2 Original line number Diff line number Diff line Loading @@ -120,8 +120,10 @@ public class ActivityView extends ViewGroup { mActivityTaskManager = ActivityTaskManager.getService(); mSurfaceView = new SurfaceView(context); // Since ActivityView#getAlpha has been overridden, we should use parent class's alpha // as master to synchronize surface view's alpha value. mSurfaceView.setAlpha(super.getAlpha()); mSurfaceView.setUseAlpha(); mSurfaceView.setAlpha(0f); mSurfaceCallback = new SurfaceCallback(); mSurfaceView.getHolder().addCallback(mSurfaceCallback); addView(mSurfaceView); Loading Loading @@ -348,10 +350,21 @@ public class ActivityView extends ViewGroup { mSurfaceView.layout(0 /* left */, 0 /* top */, r - l /* right */, b - t /* bottom */); } /** * Sets the alpha value when the content of {@link SurfaceView} needs to show or hide. * <p>Note: The surface view may ignore the alpha value in some cases. Refer to * {@link SurfaceView#setAlpha} for more details. * * @param alpha The opacity of the view. */ @Override public void setAlpha(float alpha) { super.setAlpha(alpha); if (mSurfaceView != null) { mSurfaceView.setAlpha(alpha); } } @Override public float getAlpha() { Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +1 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mActivityView = new ActivityView(mContext, null /* attrs */, 0 /* defStyle */, true /* singleTaskInstance */); // Set ActivityView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); addView(mActivityView); Loading Loading
core/java/android/app/ActivityView.java +15 −2 Original line number Diff line number Diff line Loading @@ -120,8 +120,10 @@ public class ActivityView extends ViewGroup { mActivityTaskManager = ActivityTaskManager.getService(); mSurfaceView = new SurfaceView(context); // Since ActivityView#getAlpha has been overridden, we should use parent class's alpha // as master to synchronize surface view's alpha value. mSurfaceView.setAlpha(super.getAlpha()); mSurfaceView.setUseAlpha(); mSurfaceView.setAlpha(0f); mSurfaceCallback = new SurfaceCallback(); mSurfaceView.getHolder().addCallback(mSurfaceCallback); addView(mSurfaceView); Loading Loading @@ -348,10 +350,21 @@ public class ActivityView extends ViewGroup { mSurfaceView.layout(0 /* left */, 0 /* top */, r - l /* right */, b - t /* bottom */); } /** * Sets the alpha value when the content of {@link SurfaceView} needs to show or hide. * <p>Note: The surface view may ignore the alpha value in some cases. Refer to * {@link SurfaceView#setAlpha} for more details. * * @param alpha The opacity of the view. */ @Override public void setAlpha(float alpha) { super.setAlpha(alpha); if (mSurfaceView != null) { mSurfaceView.setAlpha(alpha); } } @Override public float getAlpha() { Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +1 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mActivityView = new ActivityView(mContext, null /* attrs */, 0 /* defStyle */, true /* singleTaskInstance */); // Set ActivityView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); addView(mActivityView); Loading