Loading packages/SystemUI/res/values/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -171,10 +171,10 @@ <color name="zen_introduction">#ffffffff</color> <color name="smart_reply_button_text">@color/GM2_grey_700</color> <color name="smart_reply_button_text">@*android:color/notification_primary_text_color_light</color> <color name="smart_reply_button_text_dark_bg">@*android:color/notification_primary_text_color_dark</color> <color name="smart_reply_button_background">#ffffffff</color> <color name="smart_reply_button_stroke">#ffdadce0</color> <color name="smart_reply_button_stroke">@*android:color/accent_device_default</color> <!-- Biometric dialog colors --> <color name="biometric_dialog_dim_color">#80000000</color> <!-- 50% black --> Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +7 −3 Original line number Diff line number Diff line Loading @@ -877,10 +877,12 @@ public class NotificationContentView extends FrameLayout { public void setBackgroundTintColor(int color) { if (mExpandedSmartReplyView != null) { mExpandedSmartReplyView.setBackgroundTintColor(color); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); mExpandedSmartReplyView.setBackgroundTintColor(color, colorized); } if (mHeadsUpSmartReplyView != null) { mHeadsUpSmartReplyView.setBackgroundTintColor(color); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); mHeadsUpSmartReplyView.setBackgroundTintColor(color, colorized); } } Loading Loading @@ -1510,7 +1512,9 @@ public class NotificationContentView extends FrameLayout { smartReplyView.addPreInflatedButtons( inflatedSmartReplyViewHolder.getSmartSuggestionButtons()); // Ensure the colors of the smart suggestion buttons are up-to-date. smartReplyView.setBackgroundTintColor(entry.getRow().getCurrentBackgroundTint()); int backgroundColor = entry.getRow().getCurrentBackgroundTint(); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); smartReplyView.setBackgroundTintColor(backgroundColor, colorized); smartReplyContainer.setVisibility(View.VISIBLE); } return smartReplyView; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +11 −5 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class SmartReplyView extends ViewGroup { @ColorInt private int mCurrentStrokeColor; @ColorInt private int mCurrentTextColor; @ColorInt private int mCurrentRippleColor; private boolean mCurrentColorized; private int mMaxSqueezeRemeasureAttempts; private int mMaxNumActions; private int mMinNumSystemGeneratedReplies; Loading Loading @@ -143,7 +144,7 @@ public class SmartReplyView extends ViewGroup { mBreakIterator = BreakIterator.getLineInstance(); setBackgroundTintColor(mDefaultBackgroundColor); setBackgroundTintColor(mDefaultBackgroundColor, false /* colorized */); reallocateCandidateButtonQueueForSqueezing(); } Loading Loading @@ -182,7 +183,7 @@ public class SmartReplyView extends ViewGroup { public void resetSmartSuggestions(View newSmartReplyContainer) { mSmartReplyContainer = newSmartReplyContainer; removeAllViews(); setBackgroundTintColor(mDefaultBackgroundColor); setBackgroundTintColor(mDefaultBackgroundColor, false /* colorized */); } /** Add buttons to the {@link SmartReplyView} */ Loading Loading @@ -676,19 +677,24 @@ public class SmartReplyView extends ViewGroup { return lp.show && super.drawChild(canvas, child, drawingTime); } public void setBackgroundTintColor(int backgroundColor) { if (backgroundColor == mCurrentBackgroundColor) { /** * Set the current background color of the notification so that the smart reply buttons can * match it, and calculate other colors (e.g. text, ripple, stroke) */ public void setBackgroundTintColor(int backgroundColor, boolean colorized) { if (backgroundColor == mCurrentBackgroundColor && colorized == mCurrentColorized) { // Same color ignoring. return; } mCurrentBackgroundColor = backgroundColor; mCurrentColorized = colorized; final boolean dark = !ContrastColorUtil.isColorLight(backgroundColor); mCurrentTextColor = ContrastColorUtil.ensureTextContrast( dark ? mDefaultTextColorDarkBg : mDefaultTextColor, backgroundColor | 0xff000000, dark); mCurrentStrokeColor = ContrastColorUtil.ensureContrast( mCurrentStrokeColor = colorized ? mCurrentTextColor : ContrastColorUtil.ensureContrast( mDefaultStrokeColor, backgroundColor | 0xff000000, dark, mMinStrokeContrast); mCurrentRippleColor = dark ? mRippleColorDarkBg : mRippleColor; Loading Loading
packages/SystemUI/res/values/colors.xml +2 −2 Original line number Diff line number Diff line Loading @@ -171,10 +171,10 @@ <color name="zen_introduction">#ffffffff</color> <color name="smart_reply_button_text">@color/GM2_grey_700</color> <color name="smart_reply_button_text">@*android:color/notification_primary_text_color_light</color> <color name="smart_reply_button_text_dark_bg">@*android:color/notification_primary_text_color_dark</color> <color name="smart_reply_button_background">#ffffffff</color> <color name="smart_reply_button_stroke">#ffdadce0</color> <color name="smart_reply_button_stroke">@*android:color/accent_device_default</color> <!-- Biometric dialog colors --> <color name="biometric_dialog_dim_color">#80000000</color> <!-- 50% black --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +7 −3 Original line number Diff line number Diff line Loading @@ -877,10 +877,12 @@ public class NotificationContentView extends FrameLayout { public void setBackgroundTintColor(int color) { if (mExpandedSmartReplyView != null) { mExpandedSmartReplyView.setBackgroundTintColor(color); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); mExpandedSmartReplyView.setBackgroundTintColor(color, colorized); } if (mHeadsUpSmartReplyView != null) { mHeadsUpSmartReplyView.setBackgroundTintColor(color); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); mHeadsUpSmartReplyView.setBackgroundTintColor(color, colorized); } } Loading Loading @@ -1510,7 +1512,9 @@ public class NotificationContentView extends FrameLayout { smartReplyView.addPreInflatedButtons( inflatedSmartReplyViewHolder.getSmartSuggestionButtons()); // Ensure the colors of the smart suggestion buttons are up-to-date. smartReplyView.setBackgroundTintColor(entry.getRow().getCurrentBackgroundTint()); int backgroundColor = entry.getRow().getCurrentBackgroundTint(); boolean colorized = mNotificationEntry.getSbn().getNotification().isColorized(); smartReplyView.setBackgroundTintColor(backgroundColor, colorized); smartReplyContainer.setVisibility(View.VISIBLE); } return smartReplyView; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +11 −5 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class SmartReplyView extends ViewGroup { @ColorInt private int mCurrentStrokeColor; @ColorInt private int mCurrentTextColor; @ColorInt private int mCurrentRippleColor; private boolean mCurrentColorized; private int mMaxSqueezeRemeasureAttempts; private int mMaxNumActions; private int mMinNumSystemGeneratedReplies; Loading Loading @@ -143,7 +144,7 @@ public class SmartReplyView extends ViewGroup { mBreakIterator = BreakIterator.getLineInstance(); setBackgroundTintColor(mDefaultBackgroundColor); setBackgroundTintColor(mDefaultBackgroundColor, false /* colorized */); reallocateCandidateButtonQueueForSqueezing(); } Loading Loading @@ -182,7 +183,7 @@ public class SmartReplyView extends ViewGroup { public void resetSmartSuggestions(View newSmartReplyContainer) { mSmartReplyContainer = newSmartReplyContainer; removeAllViews(); setBackgroundTintColor(mDefaultBackgroundColor); setBackgroundTintColor(mDefaultBackgroundColor, false /* colorized */); } /** Add buttons to the {@link SmartReplyView} */ Loading Loading @@ -676,19 +677,24 @@ public class SmartReplyView extends ViewGroup { return lp.show && super.drawChild(canvas, child, drawingTime); } public void setBackgroundTintColor(int backgroundColor) { if (backgroundColor == mCurrentBackgroundColor) { /** * Set the current background color of the notification so that the smart reply buttons can * match it, and calculate other colors (e.g. text, ripple, stroke) */ public void setBackgroundTintColor(int backgroundColor, boolean colorized) { if (backgroundColor == mCurrentBackgroundColor && colorized == mCurrentColorized) { // Same color ignoring. return; } mCurrentBackgroundColor = backgroundColor; mCurrentColorized = colorized; final boolean dark = !ContrastColorUtil.isColorLight(backgroundColor); mCurrentTextColor = ContrastColorUtil.ensureTextContrast( dark ? mDefaultTextColorDarkBg : mDefaultTextColor, backgroundColor | 0xff000000, dark); mCurrentStrokeColor = ContrastColorUtil.ensureContrast( mCurrentStrokeColor = colorized ? mCurrentTextColor : ContrastColorUtil.ensureContrast( mDefaultStrokeColor, backgroundColor | 0xff000000, dark, mMinStrokeContrast); mCurrentRippleColor = dark ? mRippleColorDarkBg : mRippleColor; Loading