Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno Reason for revert: Common strings in English could be translated into different strings in other languages. Reverted changes: /q/submissionid:19748582-settings_yesno Bug: 272603842 Test: build and open Settings app Test: atest SettingsRoboTests Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
This commit is contained in:
@@ -44,7 +44,8 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
|
||||
final boolean switchState = mPreference.isChecked();
|
||||
mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState,
|
||||
Utils.getManagedProfile(mUserManager));
|
||||
mPreference.setSummary(switchState ? R.string.on : R.string.off);
|
||||
mPreference.setSummary(switchState
|
||||
? R.string.switch_on_text : R.string.switch_off_text);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -80,11 +81,11 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
|
||||
mLocationEnabler.isManagedProfileRestrictedByBase();
|
||||
if (isRestrictedByBase || !enabled) {
|
||||
mPreference.setChecked(false);
|
||||
summaryResId = enabled ? R.string.off
|
||||
summaryResId = enabled ? R.string.switch_off_text
|
||||
: R.string.location_app_permission_summary_location_off;
|
||||
} else {
|
||||
mPreference.setChecked(true);
|
||||
summaryResId = R.string.on;
|
||||
summaryResId = R.string.switch_on_text;
|
||||
}
|
||||
mPreference.setSummary(summaryResId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user