Switch references to colorError

Test: make
Change-Id: I0ed10d78763642cecc5ba8e8e15a097d51280946
This commit is contained in:
Jason Monk
2017-02-01 20:20:44 -05:00
parent 3cac802860
commit 6fca98f905
10 changed files with 47 additions and 42 deletions

View File

@@ -50,11 +50,8 @@ public class ChartDataUsagePreference extends Preference {
public ChartDataUsagePreference(Context context, AttributeSet attrs) {
super(context, attrs);
setSelectable(false);
// TODO: Resource.
mLimitColor = 0xfff4511e;
TypedArray a = context.getTheme().obtainStyledAttributes(
new int[]{android.R.attr.textColorSecondary});
mWarningColor = a.getColor(0, 0);
mLimitColor = Utils.getColorAttr(context, android.R.attr.colorError);
mWarningColor = Utils.getColorAttr(context, android.R.attr.textColorSecondary);
setLayoutResource(R.layout.data_usage_graph);
}

View File

@@ -76,7 +76,6 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
private static final String TAG_DISK_INIT = "disk_init";
static final int COLOR_PUBLIC = Color.parseColor("#ff9e9e9e");
static final int COLOR_WARNING = Color.parseColor("#fff4511e");
static final int[] COLOR_PRIVATE = new int[] {
Color.parseColor("#ff26a69a"),

View File

@@ -32,6 +32,7 @@ import android.widget.ProgressBar;
import com.android.settings.R;
import com.android.settings.deviceinfo.StorageSettings.UnmountTask;
import com.android.settingslib.Utils;
import java.io.File;
@@ -83,7 +84,7 @@ public class StorageVolumePreference extends Preference {
}
if (freeBytes < mStorageManager.getStorageLowBytes(path)) {
mColor = StorageSettings.COLOR_WARNING;
mColor = Utils.getColorAttr(context, android.R.attr.colorError);
icon = context.getDrawable(R.drawable.ic_warning_24dp);
}