From 905ad551931c583821d46467ead22533b49aa730 Mon Sep 17 00:00:00 2001 From: Steve Elliott Date: Thu, 10 Dec 2020 17:44:18 -0500 Subject: [PATCH] Fix initialization of SmartReplyView button colors Fixes: 171344635 Test: manual Change-Id: I1366eee5e50d0791ba241436d55d66ea42ac270b --- .../android/systemui/statusbar/policy/SmartReplyView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java index e7f84a55eb5fe..34c78813d11a0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java @@ -102,8 +102,7 @@ public class SmartReplyView extends ViewGroup { mHeightUpperLimit = NotificationUtils.getFontScaledHeight(mContext, R.dimen.smart_reply_button_max_height); - mCurrentBackgroundColor = context.getColor(R.color.smart_reply_button_background); - mDefaultBackgroundColor = mCurrentBackgroundColor; + mDefaultBackgroundColor = context.getColor(R.color.smart_reply_button_background); mDefaultTextColor = mContext.getColor(R.color.smart_reply_button_text); mDefaultTextColorDarkBg = mContext.getColor(R.color.smart_reply_button_text_dark_bg); mDefaultStrokeColor = mContext.getColor(R.color.smart_reply_button_stroke); @@ -142,8 +141,9 @@ public class SmartReplyView extends ViewGroup { mSingleToDoubleLineButtonWidthIncrease = 2 * (doubleLineButtonPaddingHorizontal - singleLineButtonPaddingHorizontal); - mBreakIterator = BreakIterator.getLineInstance(); + + setBackgroundTintColor(mDefaultBackgroundColor); reallocateCandidateButtonQueueForSqueezing(); } @@ -182,7 +182,7 @@ public class SmartReplyView extends ViewGroup { public void resetSmartSuggestions(View newSmartReplyContainer) { mSmartReplyContainer = newSmartReplyContainer; removeAllViews(); - mCurrentBackgroundColor = mDefaultBackgroundColor; + setBackgroundTintColor(mDefaultBackgroundColor); } /** Add buttons to the {@link SmartReplyView} */