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

@@ -389,7 +389,8 @@ public class WidgetConversationService extends RemoteViewsService {
final Spannable colorStr = new SpannableString(statusText);
if (showInRed) {
colorStr.setSpan(new ForegroundColorSpan(
mContext.getResources().getColor(R.color.timestamp_text_failed)),
mContext.getResources().getColor(R.color.timestamp_text_failed,
mContext.getTheme())),
0, statusText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
remoteViews.setTextViewText(R.id.date, colorStr);