Messaging: Fix warnings about drawables and colors

* They need the theme provided now
* Follow the suggestion by AS
  (sometimes we use ResourcesCompat, sometimes not)

Change-Id: Ie3023fee13a6fc04bd4b912721ba19dcc08befba
This commit is contained in:
Michael W
2024-12-16 15:48:46 +01:00
parent fd63d5f125
commit d430161ca0
17 changed files with 116 additions and 71 deletions

View File

@@ -644,7 +644,8 @@ public class BugleNotifications {
notificationState.mNotificationBuilder
.setSmallIcon(notificationState.getIcon())
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE)
.setColor(context.getResources().getColor(R.color.notification_accent_color))
.setColor(context.getResources().getColor(R.color.notification_accent_color,
context.getTheme()))
// .setPublicVersion(null) // TODO: when/if we ever support different
// text on the lockscreen, instead of "contents hidden"
.setCategory(CATEGORY_MESSAGE);
@@ -729,7 +730,8 @@ public class BugleNotifications {
final NotificationCompat.Builder notifBuilder = notificationState.mNotificationBuilder;
notifBuilder.setStyle(notificationState.mNotificationStyle);
notifBuilder.setColor(context.getResources().getColor(R.color.notification_accent_color));
notifBuilder.setColor(context.getResources().getColor(R.color.notification_accent_color,
context.getTheme()));
final WearableExtender wearableExtender = new WearableExtender();
setWearableGroupOptions(notifBuilder, notificationState);