Revert "Revert "Revert "Replace dynamic summary text for SettingPref"""

This reverts commit c1e9f8787f.

Reason for revert: There is an issue when dropdown menu text has a '%' sign in it.
Despite testing it on my own devices, the bug did not show up immediately.

Instead of continuing down this path for OC, we'll just revert
this patch, and then as an ugly, band-aid solution, check the
summary text for the "%s" substring, and hide it when found.
In O-DR onward, we'll look for a more permanent solution.

Change-Id: Ia7a04bfb7b09c436dc0f13564f2134a1f0c436e2
Bug: 36101902
Fix: 62211676
This commit is contained in:
Matthew Fritze
2017-06-06 01:02:19 +00:00
parent c1e9f8787f
commit ed761c4e74
5 changed files with 4 additions and 83 deletions

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));
}
}