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:
@@ -44,7 +44,7 @@ public class BubbleSummaryNotificationPreferenceController extends BasePreferenc
|
||||
return mContext.getString(
|
||||
areBubblesEnabled()
|
||||
? R.string.notifications_bubble_setting_on_summary
|
||||
: R.string.switch_off_text);
|
||||
: R.string.off);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -71,7 +71,7 @@ public class SpatialAudioParentPreferenceController extends BasePreferenceContro
|
||||
return mContext.getString(R.string.spatial_summary_on_one,
|
||||
mContext.getString(R.string.spatial_audio_wired_headphones));
|
||||
} else {
|
||||
return mContext.getString(R.string.spatial_summary_off);
|
||||
return mContext.getString(R.string.off);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -194,7 +194,7 @@ public class ZenModeSettings extends ZenModeSettingsBase {
|
||||
String description = ZenModeConfig.getDescription(mContext, true, config, false);
|
||||
|
||||
if (description == null) {
|
||||
return mContext.getString(R.string.zen_mode_sound_summary_on);
|
||||
return mContext.getString(R.string.on);
|
||||
} else {
|
||||
return mContext.getString(R.string.zen_mode_sound_summary_on_with_info,
|
||||
description);
|
||||
|
@@ -274,7 +274,7 @@ public class ZenModeSettingsFooterPreferenceController extends AbstractZenModePr
|
||||
}
|
||||
|
||||
private int getAllowRes(boolean allow) {
|
||||
return allow ? R.string.zen_mode_sound_summary_on : R.string.switch_off_text;
|
||||
return allow ? R.string.on : R.string.off;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -151,7 +151,7 @@ public class ZenRulePreference extends PrimarySwitchPreference {
|
||||
}
|
||||
|
||||
return (rule == null || !rule.isEnabled())
|
||||
? mContext.getResources().getString(R.string.switch_off_text)
|
||||
: mContext.getResources().getString(R.string.switch_on_text);
|
||||
? mContext.getResources().getString(R.string.off)
|
||||
: mContext.getResources().getString(R.string.on);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user