Replace dynamic summary text for SettingPref
All SettingPrefs that have dynamic summaries are replaced by placeholder text. Changes are for: - Battery Saver "Turn on automatically" - Notification "Dock speaker plays" - Notification "Emergency tone" Bug: 36101902 Test: make RunSettingsRoboTests Change-Id: Ic2556055c155989015dbef6b507d3e3b45b779b5
This commit is contained in:
@@ -121,6 +121,19 @@ 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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user