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:
@@ -27,8 +27,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp"
|
||||
android:textOff="@string/tare_off"
|
||||
android:textOn="@string/tare_on"
|
||||
android:textOff="@string/off"
|
||||
android:textOn="@string/on"
|
||||
android:showText="true"
|
||||
android:background="?android:attr/colorBackground" />
|
||||
<TextView
|
||||
|
@@ -26,6 +26,10 @@
|
||||
<string name="deny">Deny</string>
|
||||
<!-- Used in confirmation dialogs as the action that the user will tap to turn on the feature. [CHAR LIMIT=40]-->
|
||||
<string name="confirmation_turn_on">Turn on</string>
|
||||
<!-- State enabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="on">On</string>
|
||||
<!-- State is disabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="off">Off</string>
|
||||
|
||||
<!-- Device Info screen. Used for a status item's value when the proper value is not known -->
|
||||
<string name="device_info_default">Unknown</string>
|
||||
@@ -659,8 +663,6 @@
|
||||
<string name="location_settings_title">Location</string>
|
||||
<!-- Used in the location settings to control turning on/off the feature entirely [CHAR LIMIT=60] -->
|
||||
<string name="location_settings_primary_switch_title">Use location</string>
|
||||
<!-- Summary for Location settings when location is off [CHAR LIMIT=NONE] -->
|
||||
<string name="location_settings_summary_location_off">Off</string>
|
||||
<!-- Summary for Location settings when location is on, explaining how many apps have location permission [CHAR LIMIT=NONE]-->
|
||||
<plurals name="location_settings_summary_location_on">
|
||||
<item quantity="one">On - <xliff:g id="count">%1$d</xliff:g> app has access to location</item>
|
||||
@@ -2007,8 +2009,6 @@
|
||||
<string name="android_beam_settings_title">Android Beam</string>
|
||||
<!-- Used to describe the on state of the Android Beam feature [CHAR LIMIT=NONE] -->
|
||||
<string name="android_beam_on_summary">Ready to transmit app content via NFC</string>
|
||||
<!-- Used to describe the off state of the Android Beam feature [CHAR LIMIT=NONE] -->
|
||||
<string name="android_beam_off_summary">Off</string>
|
||||
<!-- Used to describe the enabled state of the Android Beam feature when NFC, which it relies on, is turned off [CHAR LIMIT=NONE] -->
|
||||
<string name="nfc_disabled_summary">Unavailable because NFC is turned off</string>
|
||||
<!-- Used in the Android Beam sharing preferences screen. This phrase is a trademark. [CHAR LIMIT=32] -->
|
||||
@@ -2745,8 +2745,6 @@
|
||||
<string name="emergency_address_summary">Used as your location when you make an emergency call over Wi\u2011Fi</string>
|
||||
<!-- Message of private dns that provides a help link. [CHAR LIMIT=NONE] -->
|
||||
<string name="private_dns_help_message"><annotation id="url">Learn more</annotation> about Private DNS features</string>
|
||||
<!-- Message to display when private dns is on. [CHAR LIMIT=10] -->
|
||||
<string name="private_dns_mode_on">On</string>
|
||||
|
||||
<!-- Message to display when setting wifi calling are not editable [CHAR LIMIT=NONE] -->
|
||||
<string name="wifi_calling_pref_managed_by_carrier">Setting managed by carrier</string>
|
||||
@@ -2878,10 +2876,6 @@
|
||||
<string name="display_settings">Display</string>
|
||||
<!-- Sound & display settings screen, accelerometer-based rotation check box label -->
|
||||
<string name="accelerometer_title">Auto-rotate screen</string>
|
||||
<!-- Sound & display settings screen, locked rotation check box label [CHAR LIMIT=30] -->
|
||||
<string name="auto_rotate_option_off">Off</string>
|
||||
<!-- Sound & display settings screen, accelerometer-based rotation check box label [CHAR LIMIT=30] -->
|
||||
<string name="auto_rotate_option_on">On</string>
|
||||
<!-- Sound & display settings screen, face-based rotation check box label [CHAR LIMIT=30] -->
|
||||
<string name="auto_rotate_option_face_based">On - Face-based</string>
|
||||
<!-- SmartAutoRotatePreferenceFragment settings screen, face-based rotation switch label [CHAR LIMIT=30] -->
|
||||
@@ -2939,10 +2933,6 @@
|
||||
<string name="auto_brightness_title">Adaptive brightness</string>
|
||||
<!-- Summary about the feature adaptive brightness [CHAR LIMIT=NONE] -->
|
||||
<string name="auto_brightness_summary">Screen brightness adjusts to environment</string>
|
||||
<!-- Setting option summary when adaptive brightness is on [CHAR LIMIT=NONE] -->
|
||||
<string name="auto_brightness_summary_on">On</string>
|
||||
<!-- Setting option summary when adaptive brightness is off [CHAR LIMIT=NONE] -->
|
||||
<string name="auto_brightness_summary_off">Off</string>
|
||||
<!-- Sound & display settings screen, setting option summary when preferred adaptive brightness is very low [CHAR LIMIT=100] -->
|
||||
<string name="auto_brightness_summary_very_low">Preferred brightness is very low</string>
|
||||
<!-- Sound & display settings screen, setting option summary when preferred adaptive brightness is low [CHAR LIMIT=100] -->
|
||||
@@ -2953,8 +2943,6 @@
|
||||
<string name="auto_brightness_summary_high">Preferred brightness is high</string>
|
||||
<!-- Sound & display settings screen, setting option summary when preferred adaptive brightness is very high [CHAR LIMIT=100] -->
|
||||
<string name="auto_brightness_summary_very_high">Preferred brightness is very high</string>
|
||||
<!-- Adaptive brightness settings screen, setting option to disable adaptive brightness [CHAR LIMIT=100] -->
|
||||
<string name="auto_brightness_off_title">Off</string>
|
||||
<!-- Adaptive brightness settings screen, setting option to enable adaptive brightness when user prefers very low brightness [CHAR LIMIT=100] -->
|
||||
<string name="auto_brightness_very_low_title">Very low</string>
|
||||
<!-- Adaptive brightness settings screen, setting option to enable adaptive brightness when user prefers low brightness [CHAR LIMIT=100] -->
|
||||
@@ -2993,8 +2981,6 @@
|
||||
<string name="adaptive_sleep_title">Screen attention</string>
|
||||
<!-- Setting option summary when adaptive sleep is on [CHAR LIMIT=NONE] -->
|
||||
<string name="adaptive_sleep_summary_on">On / Screen won\u2019t turn off if you\u2019re looking at it</string>
|
||||
<!-- Setting option summary when adaptive sleep is off [CHAR LIMIT=NONE] -->
|
||||
<string name="adaptive_sleep_summary_off">Off</string>
|
||||
<!-- adaptive_sleep settings screen, title about the required permission is missing [CHAR LIMIT=NONE]-->
|
||||
<string name="adaptive_sleep_title_no_permission">Camera access needed</string>
|
||||
<!-- adaptive_sleep settings screen, subtitle when permission is missing [CHAR LIMIT=NONE]-->
|
||||
@@ -3164,8 +3150,6 @@
|
||||
<string name="screensaver_settings_summary_dock">While docked</string>
|
||||
<!-- Display settings screen, summary fragment for screen saver options, activated never [CHAR LIMIT=35] -->
|
||||
<string name="screensaver_settings_summary_never">Never</string>
|
||||
<!-- Display settings screen, summary for screen saver options, screen saver is turned off [CHAR LIMIT=20] -->
|
||||
<string name="screensaver_settings_summary_off">Off</string>
|
||||
<!-- Dream settings screen, action label, when to dream [CHAR LIMIT=20] -->
|
||||
<string name="screensaver_settings_when_to_dream">When to start</string>
|
||||
<!-- Dream settings screen, action label, current selected screen saver [CHAR LIMIT=35] -->
|
||||
@@ -3201,8 +3185,6 @@
|
||||
<string name="sim_lock_settings">SIM card lock settings</string>
|
||||
<!-- Security & screen lock settings screen, SIM card lock setting option name [CHAR LIMIT=40] -->
|
||||
<string name="sim_lock_settings_category">SIM card lock</string>
|
||||
<!-- Security & screen lock settings screen, SIM card lock setting summary when off [CHAR LIMIT=NONE] -->
|
||||
<string name="sim_lock_settings_summary_off">Off</string>
|
||||
<!-- Security & screen lock settings screen, SIM card lock setting summary when on [CHAR LIMIT=NONE] -->
|
||||
<string name="sim_lock_settings_summary_on">Locked</string>
|
||||
<!-- Security & location settings screen, section heading for settings related to sim card locking [CHAR LIMIT=40] -->
|
||||
@@ -3367,10 +3349,6 @@
|
||||
<string name="status_prl_version">PRL version</string>
|
||||
<!-- About phone screen, title for MEID for multi-sim devices -->
|
||||
<string name="meid_multi_sim">MEID (sim slot %1$d)</string>
|
||||
<!-- The status text when (Wi-Fi or Bluetooth) scanning is on. [CHAR LIMIT=100] -->
|
||||
<string name="scanning_status_text_on">On</string>
|
||||
<!-- The status text when (Wi-Fi or Bluetooth) scanning is off. [CHAR LIMIT=100] -->
|
||||
<string name="scanning_status_text_off">Off</string>
|
||||
<!-- The status text when both Wi-Fi scanning and Bluetooth scanning are on. [CHAR LIMIT=100] -->
|
||||
<string name="scanning_status_text_wifi_on_ble_on">Both Wi\u2011Fi and Bluetooth scanning are on</string>
|
||||
<!-- The status text when Wi-Fi scanning is on and Bluetooth scanning are off. [CHAR LIMIT=100] -->
|
||||
@@ -5539,10 +5517,6 @@
|
||||
<string name="accessibility_vibration_settings_title">Vibration & haptics</string>
|
||||
<!-- Summary for preference screen for configuring vibrations. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_vibration_settings_summary">Control the vibration strength for different usages</string>
|
||||
<!-- "Vibration & haptics" preference's state when enabled. This text is shown next to the "Vibration & haptics" preference title. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_vibration_settings_state_on">On</string>
|
||||
<!-- "Vibration & haptics" preference's state when disabled. This text is shown next to the "Vibration & haptics" preference title. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_vibration_settings_state_off">Off</string>
|
||||
<!-- Summary for vibration preference shown when it is disabled because the device is in silent mode. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_vibration_setting_disabled_for_silent_mode_summary">Setting disabled because device is set to silent</string>
|
||||
<!-- Title for the category of preferences to configure device vibrations related to calls. [CHAR LIMIT=NONE] -->
|
||||
@@ -5669,10 +5643,6 @@
|
||||
<string name="accessibility_summary_shortcut_enabled">Shortcut on</string>
|
||||
<!-- Preference's shortcut when disabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_summary_shortcut_disabled">Off</string>
|
||||
<!-- Preference's state when enabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_summary_state_enabled">On</string>
|
||||
<!-- Preference's state when disabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_summary_state_disabled">Off</string>
|
||||
<!-- Accessibility service's preference's state when enabled but not running (like maybe it crashed). -->
|
||||
<string name="accessibility_summary_state_stopped">Not working. Tap for info.</string>
|
||||
<!-- Accessibility service's description when enabled but not running (like maybe it crashed). -->
|
||||
@@ -5764,11 +5734,6 @@
|
||||
<!-- Title for accessibility menu item to launch a settings activity. [CHAR LIMIT=15] -->
|
||||
<string name="accessibility_menu_item_settings">Settings</string>
|
||||
|
||||
<!-- Summary for the enabled state of an accessibility feature. [CHAR LIMIT=10] -->
|
||||
<string name="accessibility_feature_state_on">On</string>
|
||||
<!-- Summary for the disabled state of an accessibility feature. [CHAR LIMIT=10] -->
|
||||
<string name="accessibility_feature_state_off">Off</string>
|
||||
|
||||
<!-- Title for the preference category containing the video caption preview. [CHAR LIMIT=35] -->
|
||||
<string name="captioning_preview_title">Preview</string>
|
||||
<!-- Title for the preference catgeory containing standard video caption options. [CHAR LIMIT=35] -->
|
||||
@@ -5964,9 +5929,6 @@
|
||||
<!-- Title in main settings screen for printing settings [CHAR LIMIT=15] -->
|
||||
<string name="print_settings">Printing</string>
|
||||
|
||||
<!-- Print setting summary in settings screen [CHAR LIMIT=50] -->
|
||||
<string name="print_settings_summary_no_service">Off</string>
|
||||
|
||||
<!-- Print setting summary in settings screen [CHAR LIMIT=50] -->
|
||||
<plurals name="print_settings_summary">
|
||||
<item quantity="one">1 print service on</item>
|
||||
@@ -5994,11 +5956,6 @@
|
||||
<!-- Title for print menu item to launch the add printers activity. [CHAR LIMIT=25] -->
|
||||
<string name="print_menu_item_add_printers">Add printers</string>
|
||||
|
||||
<!-- Summary for the enabled state of a print feature. [CHAR LIMIT=10] -->
|
||||
<string name="print_feature_state_on">On</string>
|
||||
<!-- Summary for the disabled state of a print feature. [CHAR LIMIT=10] -->
|
||||
<string name="print_feature_state_off">Off</string>
|
||||
|
||||
<!-- Title of the action bar button to got to Play Store to download a print service. [CHAR LIMIT=25] -->
|
||||
<string name="print_menu_item_add_service">Add service</string>
|
||||
|
||||
@@ -6655,10 +6612,6 @@
|
||||
<string name="adaptive_connectivity_title">Adaptive connectivity</string>
|
||||
<!-- Summary of Adaptive connectivity preference. [CHAR LIMIT=NONE] -->
|
||||
<string name="adaptive_connectivity_summary">Extends battery life and improves device performance by automatically managing your network connections</string>
|
||||
<!-- Switch on text of Adaptive connectivity preference. [CHAR LIMIT=NONE]-->
|
||||
<string name="adaptive_connectivity_switch_on">On</string>
|
||||
<!-- Switch off text of Adaptive connectivity preference. [CHAR LIMIT=NONE]-->
|
||||
<string name="adaptive_connectivity_switch_off">Off</string>
|
||||
|
||||
<!-- Title of preference group for credential storage settings [CHAR LIMIT=30] -->
|
||||
<string name="credentials_title">Credential storage</string>
|
||||
@@ -6751,10 +6704,6 @@
|
||||
<!-- Backup and reset Settings screen --><skip />
|
||||
<!-- Backup and reset settings menu and activity title -->
|
||||
<string name="privacy_settings_title">Backup</string>
|
||||
<!-- Summary for the Backup settings when it is turned on. -->
|
||||
<string name="backup_summary_state_on">On</string>
|
||||
<!-- Summary for the Backup settings when it is turned off. -->
|
||||
<string name="backup_summary_state_off">Off</string>
|
||||
<!-- Backup section title -->
|
||||
<string name="backup_section_title">Backup & restore</string>
|
||||
<!-- Personal data section title -->
|
||||
@@ -8344,9 +8293,6 @@
|
||||
<!-- Sound: Summary for the spatializer effect. [CHAR LIMIT=NONE]-->
|
||||
<string name="spatial_audio_text">Audio from compatible media becomes more immersive</string>
|
||||
|
||||
<!-- Sound: Summary for the Spatial audio setting when it is off. [CHAR LIMIT=NONE]-->
|
||||
<string name="spatial_summary_off">Off</string>
|
||||
|
||||
<!-- Sound: Summary for the Spatial audio setting when it is on with one output device enabled. [CHAR LIMIT=NONE]-->
|
||||
<string name="spatial_summary_on_one">On / <xliff:g id="output device" example="Phone speaker">%1$s</xliff:g></string>
|
||||
|
||||
@@ -8539,9 +8485,6 @@
|
||||
<!-- Sound settings screen, summary format of do not disturb when on with extra info. [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_sound_summary_on_with_info">On / <xliff:g name="dnd_summary" example="No sound except alarms and media">%1$s</xliff:g></string>
|
||||
|
||||
<!-- Sound settings screen, summary format of do not disturb when on with no extra information. [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_sound_summary_on">On</string>
|
||||
|
||||
<!-- Do not disturb: Summary for zen mode duration setting indicating user will be prompted to set dnd duration whenever dnd is manually toggled on [CHAR LIMIT=NONE]-->
|
||||
<string name="zen_mode_duration_summary_always_prompt">Ask every time</string>
|
||||
|
||||
@@ -9444,12 +9387,6 @@
|
||||
<item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> categories deleted</item>
|
||||
</plurals>
|
||||
|
||||
<!-- [CHAR LIMIT=NONE] App notification settings: notifications enabled-->
|
||||
<string name="notification_toggle_on">On</string>
|
||||
|
||||
<!-- [CHAR LIMIT=NONE] App notification settings: notifications disabled-->
|
||||
<string name="notification_toggle_off">Off</string>
|
||||
|
||||
<!-- [CHAR LIMIT=NONE] App notification settings: Block option title -->
|
||||
<string name="app_notification_block_title">Block all</string>
|
||||
|
||||
@@ -9931,19 +9868,6 @@
|
||||
<!-- PIN entry dialog title for entering the administrator PIN [CHAR LIMIT=none] -->
|
||||
<string name="restr_pin_enter_admin_pin">Enter admin PIN</string>
|
||||
|
||||
<!-- Switch On/Off -->
|
||||
<string name="switch_on_text">On</string>
|
||||
<string name="switch_off_text">Off</string>
|
||||
|
||||
<!-- Switch text for nfc feature being on [CHAR LIMIT=NONE] -->
|
||||
<string name="nfc_setting_on">On</string>
|
||||
<!-- Switch text for nfc feature being off [CHAR LIMIT=NONE] -->
|
||||
<string name="nfc_setting_off">Off</string>
|
||||
|
||||
<!-- The subtext when screen pinning feature is enabled. [CHAR LIMIT=28] -->
|
||||
<string name="screen_pinning_switch_on_text">On</string>
|
||||
<!-- The subtext when screen pinning feature is disabled. [CHAR LIMIT=28] -->
|
||||
<string name="screen_pinning_switch_off_text">Off</string>
|
||||
<!-- [CHAR LIMIT=28] Screen pinning title -->
|
||||
<string name="screen_pinning_title">App pinning</string>
|
||||
<!-- [CHAR LIMIT=none] Screen pinning introduction -->
|
||||
@@ -10142,11 +10066,7 @@
|
||||
<!-- Label for notification settings for an specific app [CHAR LIMIT=40] -->
|
||||
<string name="notifications_label">Notifications</string>
|
||||
<!-- App notification summary with notifications enabled [CHAR LIMIT=40] -->
|
||||
<string name="notifications_enabled">On</string>
|
||||
<!-- App notification summary with notifications enabled [CHAR LIMIT=40] -->
|
||||
<string name="notifications_enabled_with_info"><xliff:g id="notifications_sent" example="~6 per week">%1$s</xliff:g> / <xliff:g id="notifications_categories_off" example="3 categories turned off">%2$s</xliff:g> </string>
|
||||
<!-- Label for showing apps with blocked notifications in list [CHAR LIMIT=30] -->
|
||||
<string name="notifications_disabled">Off</string>
|
||||
<!-- Label for showing apps with some blocked notifications in list [CHAR LIMIT=30] -->
|
||||
<string name="notifications_partly_blocked"><xliff:g id="count" example="1">%1$d</xliff:g> of <xliff:g id="count" example="10">%2$d</xliff:g> categories turned off</string>
|
||||
<!-- App notification summary with notifications silenced [CHAR LIMIT=40] -->
|
||||
@@ -11240,12 +11160,6 @@
|
||||
<!-- Description of message shown when app is blocklisted for background data access [CHAR LIMIT=NONE] -->
|
||||
<string name="restrict_background_blocklisted">Background data is turned off</string>
|
||||
|
||||
<!-- Summary for the Data Saver feature being on [CHAR LIMIT=NONE] -->
|
||||
<string name="data_saver_on">On</string>
|
||||
|
||||
<!-- Summary for the Data Saver feature being off [CHAR LIMIT=NONE] -->
|
||||
<string name="data_saver_off">Off</string>
|
||||
|
||||
<!-- Switch label to enable the Data Saver feature [CHAR LIMIT=NONE] -->
|
||||
<string name="data_saver_switch_title">Use Data Saver</string>
|
||||
|
||||
@@ -11279,15 +11193,9 @@
|
||||
<!-- Summary for suggestion adding more fingerprints [CHAR LIMIT=55] -->
|
||||
<string name="suggestion_additional_fingerprints_summary">Unlock with a different finger</string>
|
||||
|
||||
<!-- Summary of battery saver when on [CHAR LIMIT=NONE] -->
|
||||
<string name="battery_saver_on_summary">On</string>
|
||||
|
||||
<!-- Summary of battery saver when it is off and scheduled [CHAR LIMIT=NONE] -->
|
||||
<string name="battery_saver_off_scheduled_summary">Will turn on at <xliff:g id="battery_percentage" example="15%">%1$s</xliff:g></string>
|
||||
|
||||
<!-- Summary of battery saver when it is off and scheduled [CHAR LIMIT=NONE] -->
|
||||
<string name="battery_saver_off_summary">Off</string>
|
||||
|
||||
<!-- Battery saver: Label for button that will turn on battery saver. [CHAR LIMIT=30] -->
|
||||
<string name="battery_saver_button_turn_on">Turn on now</string>
|
||||
|
||||
@@ -11442,9 +11350,6 @@
|
||||
<!-- Title of screen controlling which apps have access to send premium SMS messages [CHAR LIMIT=60] -->
|
||||
<string name="premium_sms_access">Premium SMS access</string>
|
||||
|
||||
<!-- Summary for Bluetooth when disabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_disabled">Off</string>
|
||||
|
||||
<!-- Summary for Bluetooth when connected to one device. [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_connected_summary">Connected to <xliff:g name="device">%1$s</xliff:g></string>
|
||||
|
||||
@@ -11769,10 +11674,6 @@
|
||||
<!-- Title text for the assist gesture [CHAR LIMIT=60] DO NOT TRANSLATE -->
|
||||
<string name="assist_gesture_title" translatable="false">Assist gesture</string>
|
||||
|
||||
<!-- Switch text for each gesture setting state -->
|
||||
<string name="gesture_setting_on">On</string>
|
||||
<string name="gesture_setting_off">Off</string>
|
||||
|
||||
<!-- setting enable OEM unlock Checkbox's summary to explain this Checkbox is disabled because the bootloader has been unlocked [CHAR_LIMIT=60] -->
|
||||
<string name="oem_unlock_enable_disabled_summary_bootloader_unlocked">Bootloader is already unlocked</string>
|
||||
<!-- setting enable OEM unlock Checkbox's summary to explain this Checkbox is disabled because there is no connectivity. [CHAR_LIMIT=60] -->
|
||||
@@ -12612,9 +12513,6 @@
|
||||
<!-- Label for the on position of a switch on the mobile network details page which allows
|
||||
disabling/enabling a SIM. The SIM is enabled in this state. [CHAR LIMIT=40] -->
|
||||
<string name="mobile_network_use_sim_on">Use SIM</string>
|
||||
<!-- Label for the off position of a switch on the mobile network details page which allows
|
||||
disabling/enabling a SIM. The SIM is disabled in this state. [CHAR LIMIT=40] -->
|
||||
<string name="mobile_network_use_sim_off">Off</string>
|
||||
<!-- Text shown in an information footer on the SIM details page for a physical SIM notifying
|
||||
the user that the way to disable this SIM is to physically remove it. This is in contrast
|
||||
to eSIM's, which can disabled using an on/off toggle switch. [CHAR LIMIT=NONE] -->
|
||||
@@ -13214,11 +13112,6 @@
|
||||
<!-- Summary for see all preference when bluetooth is disable [CHAR LIMIT=none]-->
|
||||
<string name="connected_device_see_all_summary">Bluetooth will turn on</string>
|
||||
|
||||
<!-- Switch text for bluetooth feature being on [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_setting_on">On</string>
|
||||
<!-- Switch text for bluetooth feature being off [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_setting_off">Off</string>
|
||||
|
||||
<!-- Provider Model: Internet controls settings screen, item title to go into the networks settings -->
|
||||
<string name="provider_internet_settings">Internet</string>
|
||||
<!-- Provider Model: SIMs controls settings screen, item title to go into the SIMs settings -->
|
||||
@@ -13510,10 +13403,6 @@
|
||||
<!-- TARE settings title in developer options; "TARE" is the name of the feature and cannot be
|
||||
translated. [CHAR LIMIT=40] -->
|
||||
<string name="tare_settings">TARE Settings</string>
|
||||
<!-- Summary for the TARE feature being on (ie. enabled) [CHAR LIMIT=NONE] -->
|
||||
<string name="tare_on">On</string>
|
||||
<!-- Summary for the TARE feature being off (ie. disabled) [CHAR LIMIT=NONE] -->
|
||||
<string name="tare_off">Off</string>
|
||||
<!-- Allows user to revert the TARE settings to their default values [CHAR LIMIT=40] -->
|
||||
<string name="tare_revert">Revert to Default Settings</string>
|
||||
<!-- Allows user to view AlarmManager policy factors. Alarm in this context is referring to the
|
||||
|
@@ -251,8 +251,8 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
: context.getText(R.string.accessibility_summary_shortcut_disabled);
|
||||
} else {
|
||||
serviceState = serviceEnabled
|
||||
? context.getText(R.string.accessibility_summary_state_enabled)
|
||||
: context.getText(R.string.accessibility_summary_state_disabled);
|
||||
? context.getText(R.string.on)
|
||||
: context.getText(R.string.off);
|
||||
}
|
||||
|
||||
final CharSequence serviceSummary = info.loadSummary(context.getPackageManager());
|
||||
|
@@ -400,7 +400,7 @@ public abstract class AccessibilityShortcutPreferenceFragment extends DashboardF
|
||||
}
|
||||
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.switch_off_text);
|
||||
return context.getText(R.string.off);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
|
@@ -130,8 +130,7 @@ public final class AccessibilityUtil {
|
||||
static CharSequence getSummary(Context context, String settingsSecureKey) {
|
||||
final boolean enabled = Settings.Secure.getInt(context.getContentResolver(),
|
||||
settingsSecureKey, State.OFF) == State.ON;
|
||||
final int resId = enabled ? R.string.accessibility_feature_state_on
|
||||
: R.string.accessibility_feature_state_off;
|
||||
final int resId = enabled ? R.string.on : R.string.off;
|
||||
return context.getResources().getText(resId);
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ public class AutoclickPreferenceController extends BasePreferenceController {
|
||||
final boolean enabled = Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, 0) == 1;
|
||||
if (!enabled) {
|
||||
return mContext.getResources().getText(R.string.accessibility_feature_state_off);
|
||||
return mContext.getResources().getText(R.string.off);
|
||||
}
|
||||
final int delay = Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,
|
||||
|
@@ -88,8 +88,7 @@ public class MagnificationGesturesPreferenceController extends TogglePreferenceC
|
||||
resId = R.string.accessibility_screen_magnification_short_summary;
|
||||
} else {
|
||||
final boolean enabled = isChecked();
|
||||
resId = (enabled ? R.string.accessibility_feature_state_on :
|
||||
R.string.accessibility_feature_state_off);
|
||||
resId = (enabled ? R.string.on : R.string.off);
|
||||
}
|
||||
return mContext.getString(resId);
|
||||
}
|
||||
|
@@ -94,8 +94,7 @@ public class MagnificationNavbarPreferenceController extends TogglePreferenceCon
|
||||
resId = R.string.accessibility_screen_magnification_navbar_short_summary;
|
||||
} else {
|
||||
final boolean enabled = isChecked();
|
||||
resId = (enabled ? R.string.accessibility_feature_state_on :
|
||||
R.string.accessibility_feature_state_off);
|
||||
resId = (enabled ? R.string.on : R.string.off);
|
||||
}
|
||||
return mContext.getText(resId);
|
||||
}
|
||||
|
@@ -655,7 +655,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
|
||||
}
|
||||
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.switch_off_text);
|
||||
return context.getText(R.string.off);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
|
@@ -337,7 +337,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
@Override
|
||||
protected CharSequence getShortcutTypeSummary(Context context) {
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.switch_off_text);
|
||||
return context.getText(R.string.off);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
@@ -658,6 +658,6 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
final int uerShortcutType = getUserShortcutTypeFromSettings(context);
|
||||
return (uerShortcutType != AccessibilityUtil.UserShortcutType.EMPTY)
|
||||
? context.getText(R.string.accessibility_summary_shortcut_enabled)
|
||||
: context.getText(R.string.accessibility_summary_shortcut_disabled);
|
||||
: context.getText(R.string.off);
|
||||
}
|
||||
}
|
||||
|
@@ -44,9 +44,6 @@ public class VibrationPreferenceController extends BasePreferenceController {
|
||||
public CharSequence getSummary() {
|
||||
final boolean isVibrateOn = Settings.System.getInt(mContext.getContentResolver(),
|
||||
Settings.System.VIBRATE_ON, ON) == ON;
|
||||
return mContext.getText(
|
||||
isVibrateOn
|
||||
? R.string.accessibility_vibration_settings_state_on
|
||||
: R.string.accessibility_vibration_settings_state_off);
|
||||
return mContext.getText(isVibrateOn ? R.string.on : R.string.off);
|
||||
}
|
||||
}
|
||||
|
@@ -94,11 +94,11 @@ public class AppNotificationPreferenceController extends AppInfoPreferenceContro
|
||||
return "";
|
||||
}
|
||||
if (appRow.banned) {
|
||||
return context.getText(R.string.notifications_disabled);
|
||||
return context.getText(R.string.off);
|
||||
} else if (appRow.channelCount == 0) {
|
||||
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
|
||||
} else if (appRow.channelCount == appRow.blockedChannelCount) {
|
||||
return context.getText(R.string.notifications_disabled);
|
||||
return context.getText(R.string.off);
|
||||
} else {
|
||||
if (appRow.blockedChannelCount == 0) {
|
||||
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
|
||||
|
@@ -54,8 +54,7 @@ public class BackupDataPreferenceController extends BasePreferenceController {
|
||||
public CharSequence getSummary() {
|
||||
if (!mPSCD.isBackupGray()) {
|
||||
return mPSCD.isBackupEnabled()
|
||||
? mContext.getText(R.string.accessibility_feature_state_on)
|
||||
: mContext.getText(R.string.accessibility_feature_state_off);
|
||||
? mContext.getText(R.string.on) : mContext.getText(R.string.off);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@@ -58,8 +58,7 @@ public class BackupSettingsHelper {
|
||||
UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
|
||||
if (userManager.getUserProfiles().size() == 1) {
|
||||
try {
|
||||
int resId = mBackupManager.isBackupEnabled() ? R.string.backup_summary_state_on
|
||||
: R.string.backup_summary_state_off;
|
||||
int resId = mBackupManager.isBackupEnabled() ? R.string.on : R.string.off;
|
||||
return mContext.getText(resId).toString();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error getting isBackupEnabled", e);
|
||||
|
@@ -74,7 +74,7 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu
|
||||
@Override
|
||||
public String getSummary() {
|
||||
if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {
|
||||
return mContext.getString(R.string.bluetooth_disabled);
|
||||
return mContext.getString(R.string.off);
|
||||
}
|
||||
switch (mBluetoothAdapter.getConnectionState()) {
|
||||
case BluetoothAdapter.STATE_CONNECTED:
|
||||
@@ -95,7 +95,7 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu
|
||||
final Set<BluetoothDevice> devices = mBluetoothAdapter.getBondedDevices();
|
||||
if (devices == null) {
|
||||
Log.e(TAG, "getConnectedDeviceSummary, bonded devices are null");
|
||||
return mContext.getString(R.string.bluetooth_disabled);
|
||||
return mContext.getString(R.string.off);
|
||||
} else if (devices.isEmpty()) {
|
||||
Log.e(TAG, "getConnectedDeviceSummary, no bonded devices");
|
||||
return mContext.getString(R.string.disconnected);
|
||||
|
@@ -54,9 +54,9 @@ public class NfcAndPaymentFragmentController extends BasePreferenceController {
|
||||
public CharSequence getSummary() {
|
||||
if (mNfcAdapter != null) {
|
||||
if (mNfcAdapter.isEnabled()) {
|
||||
return mContext.getText(R.string.nfc_setting_on);
|
||||
return mContext.getText(R.string.on);
|
||||
} else {
|
||||
return mContext.getText(R.string.nfc_setting_off);
|
||||
return mContext.getText(R.string.off);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@@ -44,7 +44,7 @@ public class DataSaverPreference extends Preference implements DataSaverBackend.
|
||||
|
||||
@Override
|
||||
public void onDataSaverChanged(boolean isDataSaving) {
|
||||
setSummary(isDataSaving ? R.string.data_saver_on : R.string.data_saver_off);
|
||||
setSummary(isDataSaving ? R.string.on : R.string.off);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -57,9 +57,7 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(isChecked()
|
||||
? R.string.auto_brightness_summary_on
|
||||
: R.string.auto_brightness_summary_off);
|
||||
return mContext.getText(isChecked() ? R.string.on : R.string.off);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -165,7 +165,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
int activeStringId = R.string.auto_rotate_option_off;
|
||||
int activeStringId = R.string.off;
|
||||
if (!RotationPolicy.isRotationLocked(mContext)) {
|
||||
final int cameraRotate = Settings.Secure.getIntForUser(
|
||||
mContext.getContentResolver(),
|
||||
@@ -176,7 +176,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
&& !isCameraLocked()
|
||||
&& !isPowerSaveMode()
|
||||
? R.string.auto_rotate_option_face_based
|
||||
: R.string.auto_rotate_option_on;
|
||||
: R.string.on;
|
||||
}
|
||||
return mContext.getString(activeStringId);
|
||||
}
|
||||
|
@@ -137,7 +137,7 @@ public class DreamSettings extends DashboardFragment implements OnMainSwitchChan
|
||||
@VisibleForTesting
|
||||
static CharSequence getSummaryTextFromBackend(DreamBackend backend, Context context) {
|
||||
if (!backend.isEnabled()) {
|
||||
return context.getString(R.string.screensaver_settings_summary_off);
|
||||
return context.getString(R.string.off);
|
||||
} else {
|
||||
return backend.getActiveDreamName();
|
||||
}
|
||||
|
@@ -95,8 +95,7 @@ public class EmergencyGestureEntrypointPreferenceController extends BasePreferen
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(
|
||||
mEmergencyNumberUtils.getEmergencyGestureEnabled()
|
||||
? R.string.gesture_setting_on
|
||||
: R.string.gesture_setting_off);
|
||||
? R.string.on : R.string.off);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -97,7 +97,7 @@ public class BatterySaverController extends BasePreferenceController
|
||||
public CharSequence getSummary() {
|
||||
final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode();
|
||||
if (isPowerSaveOn) {
|
||||
return mContext.getString(R.string.battery_saver_on_summary);
|
||||
return mContext.getString(R.string.on);
|
||||
}
|
||||
|
||||
final ContentResolver resolver = mContext.getContentResolver();
|
||||
@@ -109,7 +109,7 @@ public class BatterySaverController extends BasePreferenceController
|
||||
return percent != 0 ?
|
||||
mContext.getString(R.string.battery_saver_off_scheduled_summary,
|
||||
Utils.formatPercentage(percent)) :
|
||||
mContext.getString(R.string.battery_saver_off_summary);
|
||||
mContext.getString(R.string.off);
|
||||
} else {
|
||||
return mContext.getString(R.string.battery_saver_pref_auto_routine_summary);
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -66,7 +66,7 @@ public class SpellCheckerPreferenceController extends AbstractPreferenceControll
|
||||
return;
|
||||
}
|
||||
if (!mTextServicesManager.isSpellCheckerEnabled()) {
|
||||
preference.setSummary(R.string.switch_off_text);
|
||||
preference.setSummary(R.string.off);
|
||||
} else {
|
||||
final SpellCheckerInfo sci = mTextServicesManager.getCurrentSpellChecker();
|
||||
if (sci != null) {
|
||||
|
@@ -44,8 +44,7 @@ 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.switch_on_text : R.string.switch_off_text);
|
||||
mPreference.setSummary(switchState ? R.string.on : R.string.off);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -81,11 +80,11 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
|
||||
mLocationEnabler.isManagedProfileRestrictedByBase();
|
||||
if (isRestrictedByBase || !enabled) {
|
||||
mPreference.setChecked(false);
|
||||
summaryResId = enabled ? R.string.switch_off_text
|
||||
summaryResId = enabled ? R.string.off
|
||||
: R.string.location_app_permission_summary_location_off;
|
||||
} else {
|
||||
mPreference.setChecked(true);
|
||||
summaryResId = R.string.switch_on_text;
|
||||
summaryResId = R.string.on;
|
||||
}
|
||||
mPreference.setSummary(summaryResId);
|
||||
}
|
||||
|
@@ -46,8 +46,7 @@ public class LocationServicesBluetoothScanningPreferenceController extends
|
||||
public CharSequence getSummary() {
|
||||
final boolean bleScanOn = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, 0) == 1;
|
||||
int resId =
|
||||
bleScanOn ? R.string.scanning_status_text_on : R.string.scanning_status_text_off;
|
||||
final int resId = bleScanOn ? R.string.on : R.string.off;
|
||||
return mContext.getString(resId);
|
||||
}
|
||||
|
||||
|
@@ -47,8 +47,7 @@ public class LocationServicesWifiScanningPreferenceController extends BasePrefer
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
final boolean wifiScanOn = mWifiManager.isScanAlwaysAvailable();
|
||||
int resId =
|
||||
wifiScanOn ? R.string.scanning_status_text_on : R.string.scanning_status_text_off;
|
||||
final int resId = wifiScanOn ? R.string.on : R.string.off;
|
||||
return mContext.getString(resId);
|
||||
}
|
||||
|
||||
|
@@ -57,7 +57,7 @@ public class TopLevelLocationPreferenceController extends BasePreferenceControll
|
||||
}
|
||||
return sSummary;
|
||||
} else {
|
||||
return mContext.getString(R.string.location_settings_summary_location_off);
|
||||
return mContext.getString(R.string.off);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ public class AdaptiveConnectivityPreferenceController extends BasePreferenceCont
|
||||
public CharSequence getSummary() {
|
||||
return Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1) == 1
|
||||
? mContext.getString(R.string.adaptive_connectivity_switch_on)
|
||||
: mContext.getString(R.string.adaptive_connectivity_switch_off);
|
||||
? mContext.getString(R.string.on)
|
||||
: mContext.getString(R.string.off);
|
||||
}
|
||||
}
|
||||
|
@@ -130,7 +130,7 @@ public class PrivateDnsPreferenceController extends BasePreferenceController
|
||||
case PRIVATE_DNS_MODE_OFF:
|
||||
return res.getString(R.string.private_dns_mode_off);
|
||||
case PRIVATE_DNS_MODE_OPPORTUNISTIC:
|
||||
return dnsesResolved ? res.getString(R.string.private_dns_mode_on)
|
||||
return dnsesResolved ? res.getString(R.string.on)
|
||||
: res.getString(R.string.private_dns_mode_opportunistic);
|
||||
case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
|
||||
return dnsesResolved
|
||||
|
@@ -216,7 +216,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
|
||||
}
|
||||
if (!hotSpotOn && !tetherOn) {
|
||||
// Both off
|
||||
mPreference.setSummary(R.string.switch_off_text);
|
||||
mPreference.setSummary(R.string.off);
|
||||
} else if (hotSpotOn && tetherOn) {
|
||||
// Both on
|
||||
mPreference.setSummary(R.string.tether_settings_summary_hotspot_on_tether_on);
|
||||
@@ -232,7 +232,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
|
||||
// Preference is not ready yet.
|
||||
return;
|
||||
}
|
||||
mPreference.setSummary(R.string.switch_off_text);
|
||||
mPreference.setSummary(R.string.off);
|
||||
}
|
||||
|
||||
class SettingObserver extends ContentObserver {
|
||||
|
@@ -65,7 +65,7 @@ public class AndroidBeamEnabler extends BaseNfcEnabler {
|
||||
if (mNfcAdapter.isNdefPushEnabled() && mPreference.isEnabled()) {
|
||||
mPreference.setSummary(R.string.android_beam_on_summary);
|
||||
} else {
|
||||
mPreference.setSummary(R.string.android_beam_off_summary);
|
||||
mPreference.setSummary(R.string.off);
|
||||
}
|
||||
break;
|
||||
case NfcAdapter.STATE_TURNING_ON:
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ public class PrintSettingPreferenceController extends BasePreferenceController i
|
||||
final List<PrintServiceInfo> services =
|
||||
mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES);
|
||||
if (services == null || services.isEmpty()) {
|
||||
return mContext.getText(R.string.print_settings_summary_no_service);
|
||||
return mContext.getText(R.string.off);
|
||||
} else {
|
||||
final int count = services.size();
|
||||
return mContext.getResources().getQuantityString(
|
||||
|
@@ -204,9 +204,9 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
|
||||
preference.setPersistent(false);
|
||||
|
||||
if (service.isEnabled()) {
|
||||
preference.setSummary(getString(R.string.print_feature_state_on));
|
||||
preference.setSummary(getString(R.string.on));
|
||||
} else {
|
||||
preference.setSummary(getString(R.string.print_feature_state_off));
|
||||
preference.setSummary(getString(R.string.off));
|
||||
}
|
||||
|
||||
Drawable drawable = service.getResolveInfo().loadIcon(pm);
|
||||
|
@@ -38,7 +38,7 @@ public class ScreenPinningPreferenceController extends BasePreferenceController
|
||||
public CharSequence getSummary() {
|
||||
return Settings.System.getInt(mContext.getContentResolver(),
|
||||
Settings.System.LOCK_TO_APP_ENABLED, 0) != 0
|
||||
? mContext.getText(R.string.screen_pinning_switch_on_text)
|
||||
: mContext.getText(R.string.screen_pinning_switch_off_text);
|
||||
? mContext.getText(R.string.on)
|
||||
: mContext.getText(R.string.off);
|
||||
}
|
||||
}
|
||||
|
@@ -38,7 +38,6 @@ import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -135,7 +134,7 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
|
||||
lp.setMarginEnd(switchBarMarginEnd);
|
||||
setBackgroundColor(mBackgroundColor);
|
||||
|
||||
setSwitchBarText(R.string.switch_on_text, R.string.switch_off_text);
|
||||
setSwitchBarText(R.string.on, R.string.off);
|
||||
|
||||
addOnSwitchChangeListener(
|
||||
(switchView, isChecked) -> setTextViewLabelAndBackground(isChecked));
|
||||
|
@@ -87,7 +87,7 @@ public final class WifiSummaryUpdater extends SummaryUpdater {
|
||||
@Override
|
||||
public String getSummary() {
|
||||
if (!mWifiTracker.enabled) {
|
||||
return mContext.getString(R.string.switch_off_text);
|
||||
return mContext.getString(R.string.off);
|
||||
}
|
||||
if (!mWifiTracker.connected) {
|
||||
return mContext.getString(R.string.disconnected);
|
||||
|
@@ -187,7 +187,7 @@ public class AccessibilitySettingsTest {
|
||||
mServiceInfo, SERVICE_ENABLED);
|
||||
|
||||
assertThat(summary).isEqualTo(
|
||||
mContext.getString(R.string.accessibility_summary_state_enabled));
|
||||
mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -198,13 +198,13 @@ public class AccessibilitySettingsTest {
|
||||
mServiceInfo, SERVICE_DISABLED);
|
||||
|
||||
assertThat(summary).isEqualTo(
|
||||
mContext.getString(R.string.accessibility_summary_state_disabled));
|
||||
mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getServiceSummary_enableServiceAndHasSummary_showsEnabledSummary() {
|
||||
final String service_enabled = mContext.getString(
|
||||
R.string.accessibility_summary_state_enabled);
|
||||
R.string.on);
|
||||
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
|
||||
|
||||
final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,
|
||||
@@ -218,7 +218,7 @@ public class AccessibilitySettingsTest {
|
||||
@Test
|
||||
public void getServiceSummary_disableServiceAndHasSummary_showsCombineDisabledSummary() {
|
||||
final String service_disabled = mContext.getString(
|
||||
R.string.accessibility_summary_state_disabled);
|
||||
R.string.off);
|
||||
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
|
||||
|
||||
final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,
|
||||
|
@@ -80,7 +80,7 @@ public final class AccessibilityUtilTest {
|
||||
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
|
||||
|
||||
assertThat(result)
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_on));
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -90,7 +90,7 @@ public final class AccessibilityUtilTest {
|
||||
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
|
||||
|
||||
assertThat(result)
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -98,7 +98,7 @@ public final class AccessibilityUtilTest {
|
||||
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
|
||||
|
||||
assertThat(result)
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -55,7 +55,7 @@ public class AutoclickPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, 0);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -58,7 +58,7 @@ public class CaptioningPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, ON);
|
||||
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getText(R.string.accessibility_feature_state_on));
|
||||
mContext.getText(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,6 +67,6 @@ public class CaptioningPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, OFF);
|
||||
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getText(R.string.accessibility_feature_state_off));
|
||||
mContext.getText(R.string.off));
|
||||
}
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public class ColorInversionPreferenceControllerTest {
|
||||
DISPLAY_INVERSION_ENABLED, State.ON);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
|
||||
mContext.getText(R.string.on))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -61,7 +61,7 @@ public class ColorInversionPreferenceControllerTest {
|
||||
DISPLAY_INVERSION_ENABLED, State.OFF);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.accessibility_feature_state_off))).isTrue();
|
||||
mContext.getText(R.string.off))).isTrue();
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
|
@@ -50,7 +50,7 @@ public class DaltonizerPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, ON);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
|
||||
mContext.getText(R.string.on))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -59,6 +59,6 @@ public class DaltonizerPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, OFF);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.accessibility_feature_state_off))).isTrue();
|
||||
mContext.getText(R.string.off))).isTrue();
|
||||
}
|
||||
}
|
||||
|
@@ -64,13 +64,13 @@ public class MagnificationGesturesPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, ON);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
|
||||
.isEqualTo(mContext.getString(R.string.on));
|
||||
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, OFF);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -89,13 +89,13 @@ public class MagnificationNavbarPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, ON);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_on));
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, OFF);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -92,7 +92,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_on));
|
||||
mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -103,7 +103,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_on));
|
||||
mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -114,7 +114,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_off));
|
||||
mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
private VibrationPreferenceController createPreferenceController() {
|
||||
|
@@ -73,7 +73,7 @@ public class BackupDataPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
|
||||
.isEqualTo(mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -83,7 +83,7 @@ public class BackupDataPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -90,7 +90,7 @@ public class BackupSettingsHelperTest {
|
||||
|
||||
String backupSummary = mBackupSettingsHelper.getSummary();
|
||||
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_on));
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,7 +100,7 @@ public class BackupSettingsHelperTest {
|
||||
|
||||
String backupSummary = mBackupSettingsHelper.getSummary();
|
||||
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_off));
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -132,7 +132,7 @@ public class BluetoothSummaryUpdaterTest {
|
||||
|
||||
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF);
|
||||
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -197,12 +197,12 @@ public class BluetoothSummaryUpdaterTest {
|
||||
|
||||
mShadowBluetoothAdapter.setEnabled(false);
|
||||
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF);
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.off));
|
||||
|
||||
// Turning ON means not enabled
|
||||
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_TURNING_ON);
|
||||
// There should still be only one invocation of disabled message
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.off));
|
||||
|
||||
mShadowBluetoothAdapter.setEnabled(true);
|
||||
mDeviceConnected[0] = false;
|
||||
|
@@ -92,13 +92,13 @@ public class NfcAndPaymentFragmentControllerTest {
|
||||
public void getSummary_nfcOn_shouldProvideOnSummary() {
|
||||
mShadowNfcAdapter.setEnabled(true);
|
||||
assertThat(mController.getSummary().toString()).contains(
|
||||
mContext.getString(R.string.switch_on_text));
|
||||
mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSummary_nfcOff_shouldProvideOffSummary() {
|
||||
mShadowNfcAdapter.setEnabled(false);
|
||||
assertThat(mController.getSummary().toString()).contains(
|
||||
mContext.getString(R.string.switch_off_text));
|
||||
mContext.getString(R.string.off));
|
||||
}
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ public class AutoBrightnessPreferenceControllerTest {
|
||||
mController.setChecked(true);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.auto_brightness_summary_on));
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -117,7 +117,7 @@ public class AutoBrightnessPreferenceControllerTest {
|
||||
mController.setChecked(false);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.auto_brightness_summary_off));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -83,9 +83,9 @@ public class SmartAutoRotatePreferenceControllerTest {
|
||||
doReturn(PACKAGE_NAME).when(mPackageManager).getRotationResolverPackageName();
|
||||
doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission(
|
||||
Manifest.permission.CAMERA, PACKAGE_NAME);
|
||||
when(mContext.getString(R.string.auto_rotate_option_off))
|
||||
when(mContext.getString(R.string.off))
|
||||
.thenReturn("Off");
|
||||
when(mContext.getString(R.string.auto_rotate_option_on))
|
||||
when(mContext.getString(R.string.on))
|
||||
.thenReturn("On");
|
||||
when(mContext.getString(R.string.auto_rotate_option_face_based))
|
||||
.thenReturn("On - Face-based");
|
||||
|
@@ -29,10 +29,10 @@ import com.android.settingslib.dream.DreamBackend.WhenToDream;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class DreamSettingsTest {
|
||||
@@ -96,7 +96,7 @@ public class DreamSettingsTest {
|
||||
when(mockBackend.isEnabled()).thenReturn(false);
|
||||
|
||||
assertThat(DreamSettings.getSummaryTextFromBackend(mockBackend, mockContext))
|
||||
.isEqualTo(mockContext.getString(R.string.screensaver_settings_summary_off));
|
||||
.isEqualTo(mockContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -67,7 +67,7 @@ public class OneHandedEnablePreferenceControllerTest {
|
||||
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.switch_on_text));
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -75,6 +75,6 @@ public class OneHandedEnablePreferenceControllerTest {
|
||||
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.switch_off_text));
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
}
|
||||
}
|
||||
|
@@ -137,7 +137,7 @@ public class PreventRingingParentPreferenceControllerTest {
|
||||
VOLUME_HUSH_OFF);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText(
|
||||
R.string.switch_off_text));
|
||||
R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -97,7 +97,7 @@ public class SpellCheckerPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mAppContext.getString(R.string.switch_off_text));
|
||||
.isEqualTo(mAppContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -97,7 +97,7 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
|
||||
verify(mUserManager)
|
||||
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, false, mUserHandle);
|
||||
verify(mPreference).setSummary(R.string.switch_on_text);
|
||||
verify(mPreference).setSummary(R.string.on);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -109,7 +109,7 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
|
||||
verify(mUserManager)
|
||||
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, mUserHandle);
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
verify(mPreference).setSummary(R.string.off);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -147,7 +147,7 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
mController.onLocationModeChanged(Settings.Secure.LOCATION_MODE_BATTERY_SAVING, false);
|
||||
|
||||
verify(mPreference).setEnabled(true);
|
||||
verify(mPreference).setSummary(R.string.switch_on_text);
|
||||
verify(mPreference).setSummary(R.string.on);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -52,7 +52,7 @@ public class TopLevelLocationPreferenceControllerTest {
|
||||
public void getSummary_whenLocationIsOff_shouldReturnStringForOff() {
|
||||
mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle());
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getString(R.string.location_settings_summary_location_off));
|
||||
mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -74,7 +74,7 @@ public class AdaptiveConnectivityPreferenceControllerTest {
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1);
|
||||
|
||||
assertThat(mController.getSummary()).isEqualTo(mContext.getString(R.string.switch_on_text));
|
||||
assertThat(mController.getSummary()).isEqualTo(mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -83,6 +83,6 @@ public class AdaptiveConnectivityPreferenceControllerTest {
|
||||
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 0);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
}
|
||||
|
@@ -224,7 +224,7 @@ public class PrivateDnsPreferenceControllerTest {
|
||||
when(lp.getValidatedPrivateDnsServers()).thenReturn(NON_EMPTY_ADDRESS_LIST);
|
||||
updateLinkProperties(lp);
|
||||
mController.updateState(mPreference);
|
||||
verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_on));
|
||||
verify(mPreference).setSummary(getResourceString(R.string.on));
|
||||
|
||||
reset(mPreference);
|
||||
lp = mock(LinkProperties.class);
|
||||
|
@@ -139,7 +139,7 @@ public class TetherPreferenceControllerTest {
|
||||
when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"456"});
|
||||
|
||||
mController.updateSummary();
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
verify(mPreference).setSummary(R.string.off);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -169,7 +169,7 @@ public class TetherPreferenceControllerTest {
|
||||
ReflectionHelpers.getField(mController, "mAirplaneModeObserver");
|
||||
observer.onChange(true, Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON));
|
||||
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
verify(mPreference).setSummary(R.string.off);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -144,7 +144,7 @@ public class PrintSettingsPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.print_settings_summary_no_service));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -76,7 +76,7 @@ public class ScreenPinningPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,7 +87,7 @@ public class ScreenPinningPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.switch_on_text));
|
||||
.isEqualTo(mContext.getString(R.string.on));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -55,8 +55,8 @@ public class SwitchBarTest {
|
||||
|
||||
@Test
|
||||
public void cycleChecked_defaultLabel_shouldUpdateTextAndBackground() {
|
||||
final int defaultOnText = R.string.switch_on_text;
|
||||
final int defaultOffText = R.string.switch_off_text;
|
||||
final int defaultOnText = R.string.on;
|
||||
final int defaultOffText = R.string.off;
|
||||
|
||||
assertThat(((TextView) mBar.findViewById(R.id.switch_text)).getText())
|
||||
.isEqualTo(mContext.getString(defaultOffText));
|
||||
|
@@ -110,7 +110,7 @@ public class WifiSummaryUpdaterTest {
|
||||
mWifiTracker.enabled = false;
|
||||
|
||||
assertThat(mSummaryUpdater.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user