Settings: Battery saver settings sub-page.
New battery saver settings page, accessed via the power usage settings overflow menu. The settings page has a master switch to toggle battery saver mode, feature disclosure text, and a preference to configure the automatic trigger level. Remove developer checkbox now that this option has a real home. NO_SQ: multi project change Bug:13329308 Change-Id: Iac54238f3406439711b44a3c17f220ac5e370a37
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.notification;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.preference.Preference;
|
||||
import android.preference.TwoStatePreference;
|
||||
@@ -55,7 +56,7 @@ public class SettingPref {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected int getResId(Context context, int value) {
|
||||
protected String getCaption(Resources res, int value) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ public class SettingPref {
|
||||
} else if (p instanceof DropDownPreference) {
|
||||
mDropDown = (DropDownPreference) p;
|
||||
for (int value : mValues) {
|
||||
mDropDown.addItem(getResId(context, value), value);
|
||||
mDropDown.addItem(getCaption(context.getResources(), value), value);
|
||||
}
|
||||
}
|
||||
update(context);
|
||||
|
Reference in New Issue
Block a user