[SettingsLib] Update Utils APIs usage

Update Utils.getColorAttr and similar methods in Utils to return a ColorStateList instead of a color

Bug: 74872054
Test: Force to display different color items then manually test
Change-Id: If002f9a578558e6254220c36ef556e8378d4522a
This commit is contained in:
Jason Chang
2018-04-10 21:09:39 +08:00
parent d1a6a71567
commit c44097d345
8 changed files with 17 additions and 14 deletions

View File

@@ -50,8 +50,8 @@ public class ChartDataUsagePreference extends Preference {
public ChartDataUsagePreference(Context context, AttributeSet attrs) {
super(context, attrs);
setSelectable(false);
mLimitColor = Utils.getColorAttr(context, android.R.attr.colorError);
mWarningColor = Utils.getColorAttr(context, android.R.attr.textColorSecondary);
mLimitColor = Utils.getColorAttrDefaultColor(context, android.R.attr.colorError);
mWarningColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary);
setLayoutResource(R.layout.data_usage_graph);
}