From ea9ef78f67bc59214a46bcc5c2b9e110f1a08686 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Tue, 4 Aug 2020 14:53:49 -0400 Subject: Use theme color for AV container background to avoid a white flash in dark mode. Bug: 159654050 Test: manual Change-Id: Iecd94cb96ffceff4cea8f5bf5f6ea32a2bf64cfa (cherry picked from commit b34928e08c86d6e3a48152062e452f65be98d1e3) --- .../src/com/android/systemui/bubbles/BubbleExpandedView.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index 3d3171208b15..1e556a3ed402 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -306,7 +306,6 @@ public class BubbleExpandedView extends LinearLayout { // Set ActivityView's alpha value as zero, since there is no view content to be shown. setContentVisibility(false); - mActivityViewContainer.setBackgroundColor(Color.WHITE); mActivityViewContainer.setOutlineProvider(new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { @@ -434,9 +433,11 @@ public class BubbleExpandedView extends LinearLayout { } void applyThemeAttrs() { - final TypedArray ta = mContext.obtainStyledAttributes( - new int[] {android.R.attr.dialogCornerRadius}); + final TypedArray ta = mContext.obtainStyledAttributes(new int[] { + android.R.attr.dialogCornerRadius, + android.R.attr.colorBackgroundFloating}); mCornerRadius = ta.getDimensionPixelSize(0, 0); + mActivityViewContainer.setBackgroundColor(ta.getColor(1, Color.WHITE)); ta.recycle(); if (mActivityView != null && ScreenDecorationsUtils.supportsRoundedCornersOnWindows( -- cgit v1.2.3-59-g8ed1b