Remove duplicate strings.

"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
This commit is contained in:
Kweku Adams
2022-08-25 21:23:50 +00:00
parent fb2090e643
commit 5949fccc7a
73 changed files with 118 additions and 246 deletions

View File

@@ -128,8 +128,7 @@ public class AssistGestureSettingsPreferenceController extends GesturePreference
if (!mAssistOnly) {
isEnabled = isEnabled || isSilenceGestureEnabled();
}
return mContext.getText(
isEnabled ? R.string.gesture_setting_on : R.string.gesture_setting_off);
return mContext.getText(isEnabled ? R.string.on : R.string.off);
}
@Override

View File

@@ -60,8 +60,7 @@ public abstract class GesturePreferenceController extends TogglePreferenceContro
@Override
public CharSequence getSummary() {
return mContext.getText(
isChecked() ? R.string.gesture_setting_on : R.string.gesture_setting_off);
return mContext.getText(isChecked() ? R.string.on : R.string.off);
}
@Override

View File

@@ -51,7 +51,7 @@ public class OneHandedEnablePreferenceController extends BasePreferenceControlle
public CharSequence getSummary() {
return mContext.getText(
OneHandedSettingsUtils.isOneHandedModeEnabled(mContext)
? R.string.gesture_setting_on : R.string.gesture_setting_off);
? R.string.on : R.string.off);
}
@Override

View File

@@ -104,7 +104,7 @@ public class PreventRingingParentPreferenceController extends TogglePreferenceCo
break;
// VOLUME_HUSH_OFF
default:
summary = mContext.getText(R.string.switch_off_text);
summary = mContext.getText(R.string.off);
}
preference.setEnabled(true);
mPreference.setSwitchEnabled(true);