Fix colorized messaging layout and smart replies.
Modify messaging style and smart replies view to
cope with colorized backgrounds.
Bug: 78928664
Bug: 77927019
Test: atest SystemUITests (with patch from ag/3992401)
Test: visual - see bug for screenshots
Change-Id: Iee66931574fb48d0340986bf520532f798ef59fc
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 327d4fe..f771cbd 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -7015,7 +7015,12 @@
contentView.setViewLayoutMarginEnd(R.id.notification_messaging,
bindResult.getIconMarginEnd());
contentView.setInt(R.id.status_bar_latest_event_content, "setLayoutColor",
- mBuilder.resolveContrastColor());
+ mBuilder.isColorized() ? mBuilder.getPrimaryTextColor()
+ : mBuilder.resolveContrastColor());
+ contentView.setInt(R.id.status_bar_latest_event_content, "setSenderTextColor",
+ mBuilder.getPrimaryTextColor());
+ contentView.setInt(R.id.status_bar_latest_event_content, "setMessageTextColor",
+ mBuilder.getSecondaryTextColor());
contentView.setBoolean(R.id.status_bar_latest_event_content, "setDisplayImagesAtEnd",
displayImagesAtEnd);
contentView.setIcon(R.id.status_bar_latest_event_content, "setLargeIcon",