[SettingsLib] Update Utils.getColorAccent() and Utils.getColorError() to return ColorStateLists instead of colors.
Update Utils.getColorAccent() and Utils.getColorError() to return ColorStateLists instead of colors and change every callers entry.
Bug: 78215054
Test: manually test for UI
Change-Id: I830222a14ef81b2456dd89c9f8631b5fd36f12ff
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
index 2d16d22..247e3d3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
@@ -29,6 +29,7 @@
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.ResolveInfo;
+import android.content.res.ColorStateList;
import android.graphics.drawable.Icon;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -609,9 +610,8 @@
TextView categoryTitle = (TextView) inflater.inflate(
R.layout.keyboard_shortcuts_category_title, keyboardShortcutsLayout, false);
categoryTitle.setText(group.getLabel());
- categoryTitle.setTextColor(group.isSystemGroup()
- ? Utils.getColorAccent(mContext)
- : mContext.getColor(R.color.ksh_application_group_color));
+ categoryTitle.setTextColor(group.isSystemGroup() ? Utils.getColorAccent(mContext) :
+ ColorStateList.valueOf(mContext.getColor(R.color.ksh_application_group_color)));
keyboardShortcutsLayout.addView(categoryTitle);
LinearLayout shortcutContainer = (LinearLayout) inflater.inflate(