From 61bfdb3a9e88d90567722085ed10dde966d5be54 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Tue, 10 Dec 2019 14:34:12 -0800 Subject: [PATCH] Use default attr instead of styleable Test: manual => toggle dark theme, pointer changes color Test: manual => expanded view radius as expected Change-Id: I5df4f1a6e5295678a08b5cf43f55028d4259e6f2 --- packages/SystemUI/res/values/attrs.xml | 7 ------- .../systemui/bubbles/BubbleExpandedView.java | 14 ++++++-------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml index 6becd21984b98..79629e4c6d7eb 100644 --- a/packages/SystemUI/res/values/attrs.xml +++ b/packages/SystemUI/res/values/attrs.xml @@ -154,12 +154,5 @@ - - - - - - - diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index e9c19d2167cd2..b7ea803eac161 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -278,17 +278,15 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList } void applyThemeAttrs() { - TypedArray ta = getContext().obtainStyledAttributes(R.styleable.BubbleExpandedView); - int bgColor = ta.getColor( - R.styleable.BubbleExpandedView_android_colorBackgroundFloating, Color.WHITE); - float cornerRadius = ta.getDimension( - R.styleable.BubbleExpandedView_android_dialogCornerRadius, 0); + final TypedArray ta = mContext.obtainStyledAttributes( + new int[] { + android.R.attr.colorBackgroundFloating, + android.R.attr.dialogCornerRadius}); + int bgColor = ta.getColor(0, Color.WHITE); + float cornerRadius = ta.getDimensionPixelSize(1, 0); ta.recycle(); - // Update triangle color. mPointerDrawable.setTint(bgColor); - - // Update ActivityView cornerRadius if (ScreenDecorationsUtils.supportsRoundedCornersOnWindows(mContext.getResources())) { mActivityView.setCornerRadius(cornerRadius); }