Loading core/java/android/app/ActivityView.java +9 −1 Original line number Diff line number Diff line Loading @@ -102,6 +102,14 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false); } /** @hide */ public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer) { super(context, attrs, defStyle); if (useTaskOrganizer()) { mTaskEmbedder = new TaskOrganizerTaskEmbedder(context, this); Loading @@ -109,7 +117,7 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd mTaskEmbedder = new VirtualDisplayTaskEmbedder(context, this, singleTaskInstance, usePublicVirtualDisplay); } mSurfaceView = new SurfaceView(context); mSurfaceView = new SurfaceView(context, null, 0, 0, disableSurfaceViewBackgroundLayer); // 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()); Loading core/java/android/view/SurfaceView.java +10 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall // we need to preserve the old one until the new one has drawn. SurfaceControl mDeferredDestroySurfaceControl; SurfaceControl mBackgroundControl; private boolean mDisableBackgroundLayer = false; /** * We use this lock in SOME cases when reading or writing SurfaceControl, Loading Loading @@ -245,10 +246,17 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } public SurfaceView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { this(context, attrs, defStyleAttr, defStyleRes, false); } /** @hide */ public SurfaceView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes, boolean disableBackgroundLayer) { super(context, attrs, defStyleAttr, defStyleRes); mRenderNode.addPositionUpdateListener(mPositionListener); setWillNotDraw(true); mDisableBackgroundLayer = disableBackgroundLayer; } /** Loading Loading @@ -839,7 +847,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall if (mBackgroundControl == null) { return; } if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0)) { if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0) && !mDisableBackgroundLayer) { t.show(mBackgroundControl); } else { t.hide(mBackgroundControl); Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +2 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,8 @@ public class BubbleExpandedView extends LinearLayout { mSettingsIcon = findViewById(R.id.settings_button); mActivityView = new ActivityView(mContext, null /* attrs */, 0 /* defStyle */, true /* singleTaskInstance */); true /* singleTaskInstance */, false /* usePublicVirtualDisplay*/, true /* disableSurfaceViewBackgroundLayer */); // Set ActivityView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); Loading Loading
core/java/android/app/ActivityView.java +9 −1 Original line number Diff line number Diff line Loading @@ -102,6 +102,14 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay) { this(context, attrs, defStyle, singleTaskInstance, usePublicVirtualDisplay, false); } /** @hide */ public ActivityView( @NonNull Context context, @NonNull AttributeSet attrs, int defStyle, boolean singleTaskInstance, boolean usePublicVirtualDisplay, boolean disableSurfaceViewBackgroundLayer) { super(context, attrs, defStyle); if (useTaskOrganizer()) { mTaskEmbedder = new TaskOrganizerTaskEmbedder(context, this); Loading @@ -109,7 +117,7 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd mTaskEmbedder = new VirtualDisplayTaskEmbedder(context, this, singleTaskInstance, usePublicVirtualDisplay); } mSurfaceView = new SurfaceView(context); mSurfaceView = new SurfaceView(context, null, 0, 0, disableSurfaceViewBackgroundLayer); // 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()); Loading
core/java/android/view/SurfaceView.java +10 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall // we need to preserve the old one until the new one has drawn. SurfaceControl mDeferredDestroySurfaceControl; SurfaceControl mBackgroundControl; private boolean mDisableBackgroundLayer = false; /** * We use this lock in SOME cases when reading or writing SurfaceControl, Loading Loading @@ -245,10 +246,17 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall } public SurfaceView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { this(context, attrs, defStyleAttr, defStyleRes, false); } /** @hide */ public SurfaceView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes, boolean disableBackgroundLayer) { super(context, attrs, defStyleAttr, defStyleRes); mRenderNode.addPositionUpdateListener(mPositionListener); setWillNotDraw(true); mDisableBackgroundLayer = disableBackgroundLayer; } /** Loading Loading @@ -839,7 +847,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall if (mBackgroundControl == null) { return; } if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0)) { if ((mSubLayer < 0) && ((mSurfaceFlags & SurfaceControl.OPAQUE) != 0) && !mDisableBackgroundLayer) { t.show(mBackgroundControl); } else { t.hide(mBackgroundControl); Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +2 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,8 @@ public class BubbleExpandedView extends LinearLayout { mSettingsIcon = findViewById(R.id.settings_button); mActivityView = new ActivityView(mContext, null /* attrs */, 0 /* defStyle */, true /* singleTaskInstance */); true /* singleTaskInstance */, false /* usePublicVirtualDisplay*/, true /* disableSurfaceViewBackgroundLayer */); // Set ActivityView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); Loading