Merge "Revert "Replace dynamic summary text for SettingPref"" into oc-dev

am: bcb2565e05

Change-Id: I8a89b5a7676a9fb9961e4275c417a425baa5938e
This commit is contained in:
Matthew Fritze
2017-05-17 04:46:15 +00:00
committed by android-build-merger
5 changed files with 4 additions and 83 deletions

View File

@@ -99,6 +99,7 @@ public class BatterySaverSettings extends SettingsPreferenceFragment
}
};
mTriggerPref.init(this);
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
}

View File

@@ -121,19 +121,6 @@ public class SettingPref {
if (mTwoState != null) {
mTwoState.setChecked(val != 0);
} else if (mDropDown != null) {
if (mValues != null) {
int index = 0;
for (int len = mValues.length; index < len; index++) {
if (mValues[index] == val) {
break;
}
}
if (index < mValues.length) {
CharSequence entry = mDropDown.getEntries()[index];
mDropDown.setSummary(entry);
}
}
mDropDown.setValue(Integer.toString(val));
}
}