Merge "Revert "Remove duplicate strings."" into udc-dev am: 9a087d6c19 am: eaba347a70

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22106646

Change-Id: I903e6289111448ffe71856b1830b914823ff1953
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kweku Adams
2023-03-16 20:45:56 +00:00
committed by Automerger Merge Worker
70 changed files with 221 additions and 113 deletions

View File

@@ -27,8 +27,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="20dp" android:padding="20dp"
android:textOff="@string/off" android:textOff="@string/tare_off"
android:textOn="@string/on" android:textOn="@string/tare_on"
android:showText="true" android:showText="true"
android:background="?android:attr/colorBackground" /> android:background="?android:attr/colorBackground" />
<TextView <TextView

View File

@@ -26,10 +26,6 @@
<string name="deny">Deny</string> <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]--> <!-- 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> <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 --> <!-- Device Info screen. Used for a status item's value when the proper value is not known -->
<string name="device_info_default">Unknown</string> <string name="device_info_default">Unknown</string>
@@ -565,6 +561,8 @@
<string name="location_settings_title">Location</string> <string name="location_settings_title">Location</string>
<!-- Used in the location settings to control turning on/off the feature entirely [CHAR LIMIT=60] --> <!-- 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> <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]--> <!-- Summary for Location settings when location is on, explaining how many apps have location permission [CHAR LIMIT=NONE]-->
<string name="location_settings_summary_location_on">{count, plural, <string name="location_settings_summary_location_on">{count, plural,
=1 {On - # app has access to location} =1 {On - # app has access to location}
@@ -1599,6 +1597,8 @@
<string name="android_beam_settings_title">Android Beam</string> <string name="android_beam_settings_title">Android Beam</string>
<!-- Used to describe the on state of the Android Beam feature [CHAR LIMIT=NONE] --> <!-- 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> <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] --> <!-- 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> <string name="nfc_disabled_summary">Unavailable because NFC is turned off</string>
<!-- Explanation of the Android Beam feature in the Android Beam settings panel. The use of "beam" here is as a verb and not considered trademarked. [CHAR LIMIT=NONE] --> <!-- Explanation of the Android Beam feature in the Android Beam settings panel. The use of "beam" here is as a verb and not considered trademarked. [CHAR LIMIT=NONE] -->
@@ -2198,6 +2198,8 @@
<string name="emergency_address_summary">Used as your location when you make an emergency call over Wi\u2011Fi</string> <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] --> <!-- 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> <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 wifi calling needs activation [CHAR LIMIT=NONE] --> <!-- Message to display when wifi calling needs activation [CHAR LIMIT=NONE] -->
<string name="wifi_calling_settings_activation_instructions">Activate Wi\u2011Fi Calling</string> <string name="wifi_calling_settings_activation_instructions">Activate Wi\u2011Fi Calling</string>
@@ -2231,6 +2233,10 @@
<string name="display_settings">Display</string> <string name="display_settings">Display</string>
<!-- Sound & display settings screen, accelerometer-based rotation check box label --> <!-- Sound & display settings screen, accelerometer-based rotation check box label -->
<string name="accelerometer_title">Auto-rotate screen</string> <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] --> <!-- Sound & display settings screen, face-based rotation check box label [CHAR LIMIT=30] -->
<string name="auto_rotate_option_face_based">On - Face-based</string> <string name="auto_rotate_option_face_based">On - Face-based</string>
<!-- SmartAutoRotatePreferenceFragment settings screen, face-based rotation switch label [CHAR LIMIT=30] --> <!-- SmartAutoRotatePreferenceFragment settings screen, face-based rotation switch label [CHAR LIMIT=30] -->
@@ -2268,6 +2274,10 @@
<string name="auto_brightness_title">Adaptive brightness</string> <string name="auto_brightness_title">Adaptive brightness</string>
<!-- Description about the feature adaptive brightness --> <!-- Description about the feature adaptive brightness -->
<string name="auto_brightness_description">Your screen brightness will automatically adjust to your environment and activities. You can move the slider manually to help adaptive brightness learn your preferences.</string> <string name="auto_brightness_description">Your screen brightness will automatically adjust to your environment and activities. You can move the slider manually to help adaptive brightness learn your preferences.</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>
<!-- Display settings screen, display white balance settings title [CHAR LIMIT=30] --> <!-- Display settings screen, display white balance settings title [CHAR LIMIT=30] -->
<string name="display_white_balance_title">Display white balance</string> <string name="display_white_balance_title">Display white balance</string>
@@ -2469,6 +2479,7 @@
<string name="sim_lock_settings">SIM lock settings</string> <string name="sim_lock_settings">SIM lock settings</string>
<!-- Security & screen lock settings screen, SIM lock setting option name [CHAR LIMIT=40] --> <!-- Security & screen lock settings screen, SIM lock setting option name [CHAR LIMIT=40] -->
<string name="sim_lock_settings_category">SIM lock</string> <string name="sim_lock_settings_category">SIM lock</string>
<!-- Security & screen lock settings screen, SIM card lock setting summary when on [CHAR LIMIT=NONE] -->
<!-- SIM lock settings screen, setting check box label [CHAR LIMIT=40] --> <!-- SIM lock settings screen, setting check box label [CHAR LIMIT=40] -->
<string name="sim_pin_toggle">Lock SIM</string> <string name="sim_pin_toggle">Lock SIM</string>
<!-- SIM card lock settings screen, setting option name to change the SIM PIN [CHAR LIMIT=40] --> <!-- SIM card lock settings screen, setting option name to change the SIM PIN [CHAR LIMIT=40] -->
@@ -2602,6 +2613,10 @@
<string name="meid_multi_sim">MEID (sim slot <xliff:g id="meid_slot_id">%1$d</xliff:g>)</string> <string name="meid_multi_sim">MEID (sim slot <xliff:g id="meid_slot_id">%1$d</xliff:g>)</string>
<!-- About phone screen, title for primary MEID for multi-sim devices --> <!-- About phone screen, title for primary MEID for multi-sim devices -->
<string name="meid_multi_sim_primary">MEID (sim slot <xliff:g id="meid_slot_id_primary">%1$d</xliff:g>) (primary)</string> <string name="meid_multi_sim_primary">MEID (sim slot <xliff:g id="meid_slot_id_primary">%1$d</xliff:g>) (primary)</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>
<!-- About phone, status item title. The phone MEID number of the current LTE/CDMA device. [CHAR LIMIT=30] --> <!-- About phone, status item title. The phone MEID number of the current LTE/CDMA device. [CHAR LIMIT=30] -->
<string name="status_meid_number">MEID</string> <string name="status_meid_number">MEID</string>
<!-- About phone, status item title. The ICCID of the current LTE device. [CHAR LIMIT=30] --> <!-- About phone, status item title. The ICCID of the current LTE device. [CHAR LIMIT=30] -->
@@ -4504,6 +4519,10 @@
<string name="accessibility_vibration_settings_title">Vibration &amp; haptics</string> <string name="accessibility_vibration_settings_title">Vibration &amp; haptics</string>
<!-- Summary for preference screen for configuring vibrations. [CHAR LIMIT=NONE] --> <!-- Summary for preference screen for configuring vibrations. [CHAR LIMIT=NONE] -->
<string name="accessibility_vibration_settings_summary">Control the vibration strength for different usages</string> <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] --> <!-- 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> <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] --> <!-- Title for the category of preferences to configure device vibrations related to calls. [CHAR LIMIT=NONE] -->
@@ -4648,6 +4667,10 @@
<string name="accessibility_summary_shortcut_enabled">Shortcut on</string> <string name="accessibility_summary_shortcut_enabled">Shortcut on</string>
<!-- Preference's shortcut when disabled. [CHAR LIMIT=NONE] --> <!-- Preference's shortcut when disabled. [CHAR LIMIT=NONE] -->
<string name="accessibility_summary_shortcut_disabled">Off</string> <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). --> <!-- 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> <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). --> <!-- Accessibility service's description when enabled but not running (like maybe it crashed). -->
@@ -4716,6 +4739,11 @@
<!-- Title for accessibility menu item to launch a settings activity. [CHAR LIMIT=15] --> <!-- Title for accessibility menu item to launch a settings activity. [CHAR LIMIT=15] -->
<string name="accessibility_menu_item_settings">Settings</string> <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] --> <!-- Title for the preference category containing the video caption preview. [CHAR LIMIT=35] -->
<string name="captioning_preview_title">Preview</string> <string name="captioning_preview_title">Preview</string>
<!-- Title for the preference catgeory containing standard video caption options. [CHAR LIMIT=35] --> <!-- Title for the preference catgeory containing standard video caption options. [CHAR LIMIT=35] -->
@@ -4897,6 +4925,8 @@
<string name="print_settings">Printing</string> <string name="print_settings">Printing</string>
<!-- Print setting summary in settings screen [CHAR LIMIT=50] --> <!-- Print setting summary in settings screen [CHAR LIMIT=50] -->
<string name="print_settings_summary_no_service">Off</string>
<string name="print_settings_summary">{count, plural, <string name="print_settings_summary">{count, plural,
=1 {1 print service on} =1 {1 print service on}
other {# print services on} other {# print services on}
@@ -4923,6 +4953,11 @@
<!-- Title for print menu item to launch the add printers activity. [CHAR LIMIT=25] --> <!-- Title for print menu item to launch the add printers activity. [CHAR LIMIT=25] -->
<string name="print_menu_item_add_printers">Add printers</string> <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] --> <!-- 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> <string name="print_menu_item_add_service">Add service</string>
@@ -5544,6 +5579,10 @@
<string name="adaptive_connectivity_title">Adaptive connectivity</string> <string name="adaptive_connectivity_title">Adaptive connectivity</string>
<!-- Summary of Adaptive connectivity preference. [CHAR LIMIT=NONE] --> <!-- 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> <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 for adaptive connectivity main switch preferences. [CHAR LIMIT=50] --> <!-- Title for adaptive connectivity main switch preferences. [CHAR LIMIT=50] -->
<string name="adaptive_connectivity_main_switch_title">Use adaptive connectivity</string> <string name="adaptive_connectivity_main_switch_title">Use adaptive connectivity</string>
@@ -5636,6 +5675,10 @@
<!-- Backup and reset Settings screen --><skip /> <!-- Backup and reset Settings screen --><skip />
<!-- Backup and reset settings menu and activity title --> <!-- Backup and reset settings menu and activity title -->
<string name="privacy_settings_title">Backup</string> <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 --> <!-- Backup section title -->
<string name="backup_section_title">Backup &amp; restore</string> <string name="backup_section_title">Backup &amp; restore</string>
<!-- Personal data section title --> <!-- Personal data section title -->
@@ -7102,6 +7145,9 @@
<!-- Sound: Summary for the spatializer effect. [CHAR LIMIT=NONE]--> <!-- Sound: Summary for the spatializer effect. [CHAR LIMIT=NONE]-->
<string name="spatial_audio_text">Audio from compatible media becomes more immersive</string> <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]--> <!-- 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> <string name="spatial_summary_on_one">On / <xliff:g id="output device" example="Phone speaker">%1$s</xliff:g></string>
@@ -7294,6 +7340,9 @@
<!-- Sound settings screen, summary format of do not disturb when on with extra info. [CHAR LIMIT=NONE] --> <!-- 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> <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]--> <!-- 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> <string name="zen_mode_duration_summary_always_prompt">Ask every time</string>
@@ -8423,6 +8472,19 @@
<!-- PIN entry dialog title for entering the administrator PIN [CHAR LIMIT=none] --> <!-- PIN entry dialog title for entering the administrator PIN [CHAR LIMIT=none] -->
<string name="restr_pin_enter_admin_pin">Enter admin PIN</string> <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 --> <!-- [CHAR LIMIT=28] Screen pinning title -->
<string name="screen_pinning_title">App pinning</string> <string name="screen_pinning_title">App pinning</string>
<!-- [CHAR LIMIT=none] Screen pinning introduction --> <!-- [CHAR LIMIT=none] Screen pinning introduction -->
@@ -8576,7 +8638,11 @@
<!-- Label for notification settings for an specific app [CHAR LIMIT=40] --> <!-- Label for notification settings for an specific app [CHAR LIMIT=40] -->
<string name="notifications_label">Notifications</string> <string name="notifications_label">Notifications</string>
<!-- App notification summary with notifications enabled [CHAR LIMIT=40] --> <!-- 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> <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>
<!-- Permissions preference summary [CHAR LIMIT=40] --> <!-- Permissions preference summary [CHAR LIMIT=40] -->
<string name="notifications_categories_off">{count, plural, <string name="notifications_categories_off">{count, plural,
@@ -9411,6 +9477,12 @@
<!-- Description of message shown when app is blocklisted for background data access [CHAR LIMIT=NONE] --> <!-- 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> <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] --> <!-- Switch label to enable the Data Saver feature [CHAR LIMIT=NONE] -->
<string name="data_saver_switch_title">Use Data Saver</string> <string name="data_saver_switch_title">Use Data Saver</string>
@@ -9429,9 +9501,15 @@
<!-- Summary for suggestion adding more fingerprints [CHAR LIMIT=55] --> <!-- Summary for suggestion adding more fingerprints [CHAR LIMIT=55] -->
<string name="suggestion_additional_fingerprints_summary">Unlock with a different finger</string> <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] --> <!-- 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> <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>
<!-- Preference title for battery usage list page[CHAR_LIMIT=50]--> <!-- Preference title for battery usage list page[CHAR_LIMIT=50]-->
<string name="app_battery_usage_title">App battery usage</string> <string name="app_battery_usage_title">App battery usage</string>
@@ -9577,6 +9655,9 @@
<!-- Title of screen controlling which apps have access to send premium SMS messages [CHAR LIMIT=60] --> <!-- 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> <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] --> <!-- 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> <string name="bluetooth_connected_summary">Connected to <xliff:g name="device">%1$s</xliff:g></string>
@@ -9813,6 +9894,10 @@
<!-- Title text for the assist gesture [CHAR LIMIT=60] DO NOT TRANSLATE --> <!-- Title text for the assist gesture [CHAR LIMIT=60] DO NOT TRANSLATE -->
<string name="assist_gesture_title" translatable="false">Assist gesture</string> <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] --> <!-- 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> <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 or the device is locked by the carrier [CHAR_LIMIT=60] --> <!-- setting enable OEM unlock Checkbox's summary to explain this Checkbox is disabled because there is no connectivity or the device is locked by the carrier [CHAR_LIMIT=60] -->
@@ -10616,6 +10701,9 @@
<!-- Label for the on position of a switch on the mobile network details page which allows <!-- 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] --> disabling/enabling a SIM. The SIM is enabled in this state. [CHAR LIMIT=40] -->
<string name="mobile_network_use_sim_on">Use SIM</string> <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 <!-- 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 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] --> to eSIM's, which can disabled using an on/off toggle switch. [CHAR LIMIT=NONE] -->
@@ -11435,6 +11523,10 @@
<!-- TARE settings title in developer options; "TARE" is the name of the feature and cannot be <!-- TARE settings title in developer options; "TARE" is the name of the feature and cannot be
translated. [CHAR LIMIT=40] --> translated. [CHAR LIMIT=40] -->
<string name="tare_settings">TARE Settings</string> <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] --> <!-- Allows user to revert the TARE settings to their default values [CHAR LIMIT=40] -->
<string name="tare_revert">Revert to Default Settings</string> <string name="tare_revert">Revert to Default Settings</string>
<!-- Allows user to view AlarmManager policy factors. Alarm in this context is referring to the <!-- Allows user to view AlarmManager policy factors. Alarm in this context is referring to the

View File

@@ -266,8 +266,8 @@ public class AccessibilitySettings extends DashboardFragment {
: context.getText(R.string.accessibility_summary_shortcut_disabled); : context.getText(R.string.accessibility_summary_shortcut_disabled);
} else { } else {
serviceState = serviceEnabled serviceState = serviceEnabled
? context.getText(R.string.on) ? context.getText(R.string.accessibility_summary_state_enabled)
: context.getText(R.string.off); : context.getText(R.string.accessibility_summary_state_disabled);
} }
final CharSequence serviceSummary = info.loadSummary(context.getPackageManager()); final CharSequence serviceSummary = info.loadSummary(context.getPackageManager());

View File

@@ -422,7 +422,7 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted
} }
if (!mShortcutPreference.isChecked()) { if (!mShortcutPreference.isChecked()) {
return context.getText(R.string.off); return context.getText(R.string.switch_off_text);
} }
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context, final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,

View File

@@ -130,7 +130,8 @@ public final class AccessibilityUtil {
static CharSequence getSummary(Context context, String settingsSecureKey) { static CharSequence getSummary(Context context, String settingsSecureKey) {
final boolean enabled = Settings.Secure.getInt(context.getContentResolver(), final boolean enabled = Settings.Secure.getInt(context.getContentResolver(),
settingsSecureKey, State.OFF) == State.ON; settingsSecureKey, State.OFF) == State.ON;
final int resId = enabled ? R.string.on : R.string.off; final int resId = enabled ? R.string.accessibility_feature_state_on
: R.string.accessibility_feature_state_off;
return context.getResources().getText(resId); return context.getResources().getText(resId);
} }

View File

@@ -53,7 +53,7 @@ public class AutoclickPreferenceController extends BasePreferenceController {
final boolean enabled = Settings.Secure.getInt(mContext.getContentResolver(), final boolean enabled = Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF) == ON; Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF) == ON;
if (!enabled) { if (!enabled) {
return mContext.getResources().getText(R.string.off); return mContext.getResources().getText(R.string.accessibility_feature_state_off);
} }
final int delayMillis = Settings.Secure.getInt(mContext.getContentResolver(), final int delayMillis = Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY, Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,

View File

@@ -87,7 +87,8 @@ public class MagnificationGesturesPreferenceController extends TogglePreferenceC
resId = R.string.accessibility_screen_magnification_short_summary; resId = R.string.accessibility_screen_magnification_short_summary;
} else { } else {
final boolean enabled = isChecked(); final boolean enabled = isChecked();
resId = (enabled ? R.string.on : R.string.off); resId = (enabled ? R.string.accessibility_feature_state_on :
R.string.accessibility_feature_state_off);
} }
return mContext.getString(resId); return mContext.getString(resId);
} }

View File

@@ -94,7 +94,8 @@ public class MagnificationNavbarPreferenceController extends TogglePreferenceCon
resId = R.string.accessibility_screen_magnification_navbar_short_summary; resId = R.string.accessibility_screen_magnification_navbar_short_summary;
} else { } else {
final boolean enabled = isChecked(); final boolean enabled = isChecked();
resId = (enabled ? R.string.on : R.string.off); resId = (enabled ? R.string.accessibility_feature_state_on :
R.string.accessibility_feature_state_off);
} }
return mContext.getText(resId); return mContext.getText(resId);
} }

View File

@@ -658,7 +658,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
} }
if (!mShortcutPreference.isChecked()) { if (!mShortcutPreference.isChecked()) {
return context.getText(R.string.off); return context.getText(R.string.switch_off_text);
} }
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context, final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,

View File

@@ -431,7 +431,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
@Override @Override
protected CharSequence getShortcutTypeSummary(Context context) { protected CharSequence getShortcutTypeSummary(Context context) {
if (!mShortcutPreference.isChecked()) { if (!mShortcutPreference.isChecked()) {
return context.getText(R.string.off); return context.getText(R.string.switch_off_text);
} }
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context, final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
@@ -752,6 +752,6 @@ public class ToggleScreenMagnificationPreferenceFragment extends
final int uerShortcutType = getUserShortcutTypeFromSettings(context); final int uerShortcutType = getUserShortcutTypeFromSettings(context);
return (uerShortcutType != AccessibilityUtil.UserShortcutType.EMPTY) return (uerShortcutType != AccessibilityUtil.UserShortcutType.EMPTY)
? context.getText(R.string.accessibility_summary_shortcut_enabled) ? context.getText(R.string.accessibility_summary_shortcut_enabled)
: context.getText(R.string.off); : context.getText(R.string.accessibility_summary_shortcut_disabled);
} }
} }

View File

@@ -44,6 +44,9 @@ public class VibrationPreferenceController extends BasePreferenceController {
public CharSequence getSummary() { public CharSequence getSummary() {
final boolean isVibrateOn = Settings.System.getInt(mContext.getContentResolver(), final boolean isVibrateOn = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.VIBRATE_ON, ON) == ON; Settings.System.VIBRATE_ON, ON) == ON;
return mContext.getText(isVibrateOn ? R.string.on : R.string.off); return mContext.getText(
isVibrateOn
? R.string.accessibility_vibration_settings_state_on
: R.string.accessibility_vibration_settings_state_off);
} }
} }

View File

@@ -99,11 +99,11 @@ public class AppNotificationPreferenceController extends AppInfoPreferenceContro
return ""; return "";
} }
if (appRow.banned) { if (appRow.banned) {
return context.getText(R.string.off); return context.getText(R.string.notifications_disabled);
} else if (appRow.channelCount == 0) { } else if (appRow.channelCount == 0) {
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false); return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
} else if (appRow.channelCount == appRow.blockedChannelCount) { } else if (appRow.channelCount == appRow.blockedChannelCount) {
return context.getText(R.string.off); return context.getText(R.string.notifications_disabled);
} else { } else {
if (appRow.blockedChannelCount == 0) { if (appRow.blockedChannelCount == 0) {
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false); return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);

View File

@@ -54,7 +54,8 @@ public class BackupDataPreferenceController extends BasePreferenceController {
public CharSequence getSummary() { public CharSequence getSummary() {
if (!mPSCD.isBackupGray()) { if (!mPSCD.isBackupGray()) {
return mPSCD.isBackupEnabled() return mPSCD.isBackupEnabled()
? mContext.getText(R.string.on) : mContext.getText(R.string.off); ? mContext.getText(R.string.accessibility_feature_state_on)
: mContext.getText(R.string.accessibility_feature_state_off);
} }
return null; return null;
} }

View File

@@ -58,7 +58,8 @@ public class BackupSettingsHelper {
UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
if (userManager.getUserProfiles().size() == 1) { if (userManager.getUserProfiles().size() == 1) {
try { try {
int resId = mBackupManager.isBackupEnabled() ? R.string.on : R.string.off; int resId = mBackupManager.isBackupEnabled()
? R.string.backup_summary_state_on : R.string.backup_summary_state_off;
return mContext.getText(resId).toString(); return mContext.getText(resId).toString();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG, "Error getting isBackupEnabled", e); Log.e(TAG, "Error getting isBackupEnabled", e);

View File

@@ -74,7 +74,7 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu
@Override @Override
public String getSummary() { public String getSummary() {
if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {
return mContext.getString(R.string.off); return mContext.getString(R.string.bluetooth_disabled);
} }
switch (mBluetoothAdapter.getConnectionState()) { switch (mBluetoothAdapter.getConnectionState()) {
case BluetoothAdapter.STATE_CONNECTED: case BluetoothAdapter.STATE_CONNECTED:
@@ -95,7 +95,7 @@ public final class BluetoothSummaryUpdater extends SummaryUpdater implements Blu
final Set<BluetoothDevice> devices = mBluetoothAdapter.getBondedDevices(); final Set<BluetoothDevice> devices = mBluetoothAdapter.getBondedDevices();
if (devices == null) { if (devices == null) {
Log.e(TAG, "getConnectedDeviceSummary, bonded devices are null"); Log.e(TAG, "getConnectedDeviceSummary, bonded devices are null");
return mContext.getString(R.string.off); return mContext.getString(R.string.bluetooth_disabled);
} else if (devices.isEmpty()) { } else if (devices.isEmpty()) {
Log.e(TAG, "getConnectedDeviceSummary, no bonded devices"); Log.e(TAG, "getConnectedDeviceSummary, no bonded devices");
return mContext.getString(R.string.disconnected); return mContext.getString(R.string.disconnected);

View File

@@ -54,9 +54,9 @@ public class NfcAndPaymentFragmentController extends BasePreferenceController {
public CharSequence getSummary() { public CharSequence getSummary() {
if (mNfcAdapter != null) { if (mNfcAdapter != null) {
if (mNfcAdapter.isEnabled()) { if (mNfcAdapter.isEnabled()) {
return mContext.getText(R.string.on); return mContext.getText(R.string.nfc_setting_on);
} else { } else {
return mContext.getText(R.string.off); return mContext.getText(R.string.nfc_setting_off);
} }
} }
return null; return null;

View File

@@ -44,7 +44,7 @@ public class DataSaverPreference extends Preference implements DataSaverBackend.
@Override @Override
public void onDataSaverChanged(boolean isDataSaving) { public void onDataSaverChanged(boolean isDataSaving) {
setSummary(isDataSaving ? R.string.on : R.string.off); setSummary(isDataSaving ? R.string.data_saver_on : R.string.data_saver_off);
} }
@Override @Override

View File

@@ -57,7 +57,9 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
@Override @Override
public CharSequence getSummary() { public CharSequence getSummary() {
return mContext.getText(isChecked() ? R.string.on : R.string.off); return mContext.getText(isChecked()
? R.string.auto_brightness_summary_on
: R.string.auto_brightness_summary_off);
} }
@Override @Override

View File

@@ -175,7 +175,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
@Override @Override
public CharSequence getSummary() { public CharSequence getSummary() {
int activeStringId = R.string.off; int activeStringId = R.string.auto_rotate_option_off;
if (!RotationPolicy.isRotationLocked(mContext)) { if (!RotationPolicy.isRotationLocked(mContext)) {
final int cameraRotate = Settings.Secure.getIntForUser( final int cameraRotate = Settings.Secure.getIntForUser(
mContext.getContentResolver(), mContext.getContentResolver(),
@@ -186,7 +186,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
&& !isCameraLocked() && !isCameraLocked()
&& !isPowerSaveMode() && !isPowerSaveMode()
? R.string.auto_rotate_option_face_based ? R.string.auto_rotate_option_face_based
: R.string.on; : R.string.auto_rotate_option_on;
} }
return mContext.getString(activeStringId); return mContext.getString(activeStringId);
} }

View File

@@ -95,7 +95,8 @@ public class EmergencyGestureEntrypointPreferenceController extends BasePreferen
public CharSequence getSummary() { public CharSequence getSummary() {
return mContext.getText( return mContext.getText(
mEmergencyNumberUtils.getEmergencyGestureEnabled() mEmergencyNumberUtils.getEmergencyGestureEnabled()
? R.string.on : R.string.off); ? R.string.gesture_setting_on
: R.string.gesture_setting_off);
} }
/** /**

View File

@@ -97,7 +97,7 @@ public class BatterySaverController extends BasePreferenceController
public CharSequence getSummary() { public CharSequence getSummary() {
final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode(); final boolean isPowerSaveOn = mPowerManager.isPowerSaveMode();
if (isPowerSaveOn) { if (isPowerSaveOn) {
return mContext.getString(R.string.on); return mContext.getString(R.string.battery_saver_on_summary);
} }
final ContentResolver resolver = mContext.getContentResolver(); final ContentResolver resolver = mContext.getContentResolver();
@@ -109,7 +109,7 @@ public class BatterySaverController extends BasePreferenceController
return percent != 0 ? return percent != 0 ?
mContext.getString(R.string.battery_saver_off_scheduled_summary, mContext.getString(R.string.battery_saver_off_scheduled_summary,
Utils.formatPercentage(percent)) : Utils.formatPercentage(percent)) :
mContext.getString(R.string.off); mContext.getString(R.string.battery_saver_off_summary);
} else { } else {
return mContext.getString(R.string.battery_saver_pref_auto_routine_summary); return mContext.getString(R.string.battery_saver_pref_auto_routine_summary);
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -66,7 +66,7 @@ public class SpellCheckerPreferenceController extends AbstractPreferenceControll
return; return;
} }
if (!mTextServicesManager.isSpellCheckerEnabled()) { if (!mTextServicesManager.isSpellCheckerEnabled()) {
preference.setSummary(R.string.off); preference.setSummary(R.string.switch_off_text);
} else { } else {
final SpellCheckerInfo sci = mTextServicesManager.getCurrentSpellChecker(); final SpellCheckerInfo sci = mTextServicesManager.getCurrentSpellChecker();
if (sci != null) { if (sci != null) {

View File

@@ -44,7 +44,8 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
final boolean switchState = mPreference.isChecked(); final boolean switchState = mPreference.isChecked();
mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState, mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState,
Utils.getManagedProfile(mUserManager)); 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 true;
} }
return false; return false;
@@ -80,11 +81,11 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
mLocationEnabler.isManagedProfileRestrictedByBase(); mLocationEnabler.isManagedProfileRestrictedByBase();
if (isRestrictedByBase || !enabled) { if (isRestrictedByBase || !enabled) {
mPreference.setChecked(false); mPreference.setChecked(false);
summaryResId = enabled ? R.string.off summaryResId = enabled ? R.string.switch_off_text
: R.string.location_app_permission_summary_location_off; : R.string.location_app_permission_summary_location_off;
} else { } else {
mPreference.setChecked(true); mPreference.setChecked(true);
summaryResId = R.string.on; summaryResId = R.string.switch_on_text;
} }
mPreference.setSummary(summaryResId); mPreference.setSummary(summaryResId);
} }

View File

@@ -46,7 +46,8 @@ public class LocationServicesBluetoothScanningPreferenceController extends
public CharSequence getSummary() { public CharSequence getSummary() {
final boolean bleScanOn = Settings.Global.getInt(mContext.getContentResolver(), final boolean bleScanOn = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, 0) == 1; Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, 0) == 1;
final int resId = bleScanOn ? R.string.on : R.string.off; int resId =
bleScanOn ? R.string.scanning_status_text_on : R.string.scanning_status_text_off;
return mContext.getString(resId); return mContext.getString(resId);
} }

View File

@@ -47,7 +47,8 @@ public class LocationServicesWifiScanningPreferenceController extends BasePrefer
@Override @Override
public CharSequence getSummary() { public CharSequence getSummary() {
final boolean wifiScanOn = mWifiManager.isScanAlwaysAvailable(); final boolean wifiScanOn = mWifiManager.isScanAlwaysAvailable();
final int resId = wifiScanOn ? R.string.on : R.string.off; int resId =
wifiScanOn ? R.string.scanning_status_text_on : R.string.scanning_status_text_off;
return mContext.getString(resId); return mContext.getString(resId);
} }

View File

@@ -58,7 +58,7 @@ public class TopLevelLocationPreferenceController extends BasePreferenceControll
} }
return sSummary; return sSummary;
} else { } else {
return mContext.getString(R.string.off); return mContext.getString(R.string.location_settings_summary_location_off);
} }
} }

View File

@@ -48,7 +48,7 @@ public class AdaptiveConnectivityPreferenceController extends BasePreferenceCont
public CharSequence getSummary() { public CharSequence getSummary() {
return Settings.Secure.getInt(mContext.getContentResolver(), return Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1) == 1 Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1) == 1
? mContext.getString(R.string.on) ? mContext.getString(R.string.adaptive_connectivity_switch_on)
: mContext.getString(R.string.off); : mContext.getString(R.string.adaptive_connectivity_switch_off);
} }
} }

View File

@@ -130,7 +130,7 @@ public class PrivateDnsPreferenceController extends BasePreferenceController
case PRIVATE_DNS_MODE_OFF: case PRIVATE_DNS_MODE_OFF:
return res.getString(R.string.private_dns_mode_off); return res.getString(R.string.private_dns_mode_off);
case PRIVATE_DNS_MODE_OPPORTUNISTIC: case PRIVATE_DNS_MODE_OPPORTUNISTIC:
return dnsesResolved ? res.getString(R.string.on) return dnsesResolved ? res.getString(R.string.private_dns_mode_on)
: res.getString(R.string.private_dns_mode_opportunistic); : res.getString(R.string.private_dns_mode_opportunistic);
case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME: case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
return dnsesResolved return dnsesResolved

View File

@@ -65,7 +65,7 @@ public class AndroidBeamEnabler extends BaseNfcEnabler {
if (mNfcAdapter.isNdefPushEnabled() && mPreference.isEnabled()) { if (mNfcAdapter.isNdefPushEnabled() && mPreference.isEnabled()) {
mPreference.setSummary(R.string.android_beam_on_summary); mPreference.setSummary(R.string.android_beam_on_summary);
} else { } else {
mPreference.setSummary(R.string.off); mPreference.setSummary(R.string.android_beam_off_summary);
} }
break; break;
case NfcAdapter.STATE_TURNING_ON: case NfcAdapter.STATE_TURNING_ON:

View File

@@ -44,7 +44,7 @@ public class BubbleSummaryNotificationPreferenceController extends BasePreferenc
return mContext.getString( return mContext.getString(
areBubblesEnabled() areBubblesEnabled()
? R.string.notifications_bubble_setting_on_summary ? R.string.notifications_bubble_setting_on_summary
: R.string.off); : R.string.switch_off_text);
} }
@Override @Override

View File

@@ -71,7 +71,7 @@ public class SpatialAudioParentPreferenceController extends BasePreferenceContro
return mContext.getString(R.string.spatial_summary_on_one, return mContext.getString(R.string.spatial_summary_on_one,
mContext.getString(R.string.spatial_audio_wired_headphones)); mContext.getString(R.string.spatial_audio_wired_headphones));
} else { } else {
return mContext.getString(R.string.off); return mContext.getString(R.string.spatial_summary_off);
} }
} }
} }

View File

@@ -194,7 +194,7 @@ public class ZenModeSettings extends ZenModeSettingsBase {
String description = ZenModeConfig.getDescription(mContext, true, config, false); String description = ZenModeConfig.getDescription(mContext, true, config, false);
if (description == null) { if (description == null) {
return mContext.getString(R.string.on); return mContext.getString(R.string.zen_mode_sound_summary_on);
} else { } else {
return mContext.getString(R.string.zen_mode_sound_summary_on_with_info, return mContext.getString(R.string.zen_mode_sound_summary_on_with_info,
description); description);

View File

@@ -274,7 +274,7 @@ public class ZenModeSettingsFooterPreferenceController extends AbstractZenModePr
} }
private int getAllowRes(boolean allow) { private int getAllowRes(boolean allow) {
return allow ? R.string.on : R.string.off; return allow ? R.string.zen_mode_sound_summary_on : R.string.switch_off_text;
} }
@Override @Override

View File

@@ -165,7 +165,7 @@ public class ZenRulePreference extends PrimarySwitchPreference {
} }
return (rule == null || !rule.isEnabled()) return (rule == null || !rule.isEnabled())
? mContext.getResources().getString(R.string.off) ? mContext.getResources().getString(R.string.switch_off_text)
: mContext.getResources().getString(R.string.on); : mContext.getResources().getString(R.string.switch_on_text);
} }
} }

View File

@@ -117,7 +117,7 @@ public class PrintSettingPreferenceController extends BasePreferenceController i
final List<PrintServiceInfo> services = final List<PrintServiceInfo> services =
mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES); mPrintManager.getPrintServices(PrintManager.ENABLED_SERVICES);
if (services == null || services.isEmpty()) { if (services == null || services.isEmpty()) {
return mContext.getText(R.string.off); return mContext.getText(R.string.print_settings_summary_no_service);
} else { } else {
return StringUtil.getIcuPluralsString(mContext, services.size(), return StringUtil.getIcuPluralsString(mContext, services.size(),
R.string.print_settings_summary); R.string.print_settings_summary);

View File

@@ -204,9 +204,9 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
preference.setPersistent(false); preference.setPersistent(false);
if (service.isEnabled()) { if (service.isEnabled()) {
preference.setSummary(getString(R.string.on)); preference.setSummary(getString(R.string.print_feature_state_on));
} else { } else {
preference.setSummary(getString(R.string.off)); preference.setSummary(getString(R.string.print_feature_state_off));
} }
Drawable drawable = service.getResolveInfo().loadIcon(pm); Drawable drawable = service.getResolveInfo().loadIcon(pm);

View File

@@ -38,7 +38,7 @@ public class ScreenPinningPreferenceController extends BasePreferenceController
public CharSequence getSummary() { public CharSequence getSummary() {
return Settings.System.getInt(mContext.getContentResolver(), return Settings.System.getInt(mContext.getContentResolver(),
Settings.System.LOCK_TO_APP_ENABLED, 0) != 0 Settings.System.LOCK_TO_APP_ENABLED, 0) != 0
? mContext.getText(R.string.on) ? mContext.getText(R.string.screen_pinning_switch_on_text)
: mContext.getText(R.string.off); : mContext.getText(R.string.screen_pinning_switch_off_text);
} }
} }

View File

@@ -134,7 +134,7 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
lp.setMarginEnd(switchBarMarginEnd); lp.setMarginEnd(switchBarMarginEnd);
setBackgroundColor(mBackgroundColor); setBackgroundColor(mBackgroundColor);
setSwitchBarText(R.string.on, R.string.off); setSwitchBarText(R.string.switch_on_text, R.string.switch_off_text);
addOnSwitchChangeListener( addOnSwitchChangeListener(
(switchView, isChecked) -> setTextViewLabelAndBackground(isChecked)); (switchView, isChecked) -> setTextViewLabelAndBackground(isChecked));

View File

@@ -87,7 +87,7 @@ public final class WifiSummaryUpdater extends SummaryUpdater {
@Override @Override
public String getSummary() { public String getSummary() {
if (!mWifiTracker.enabled) { if (!mWifiTracker.enabled) {
return mContext.getString(R.string.off); return mContext.getString(R.string.switch_off_text);
} }
if (!mWifiTracker.connected) { if (!mWifiTracker.connected) {
return mContext.getString(R.string.disconnected); return mContext.getString(R.string.disconnected);

View File

@@ -194,7 +194,7 @@ public class AccessibilitySettingsTest {
mServiceInfo, SERVICE_ENABLED); mServiceInfo, SERVICE_ENABLED);
assertThat(summary).isEqualTo( assertThat(summary).isEqualTo(
mContext.getString(R.string.on)); mContext.getString(R.string.accessibility_summary_state_enabled));
} }
@Test @Test
@@ -205,13 +205,13 @@ public class AccessibilitySettingsTest {
mServiceInfo, SERVICE_DISABLED); mServiceInfo, SERVICE_DISABLED);
assertThat(summary).isEqualTo( assertThat(summary).isEqualTo(
mContext.getString(R.string.off)); mContext.getString(R.string.accessibility_summary_state_disabled));
} }
@Test @Test
public void getServiceSummary_enableServiceAndHasSummary_showsEnabledSummary() { public void getServiceSummary_enableServiceAndHasSummary_showsEnabledSummary() {
final String service_enabled = mContext.getString( final String service_enabled = mContext.getString(
R.string.on); R.string.accessibility_summary_state_enabled);
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any()); doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext, final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,
@@ -225,7 +225,7 @@ public class AccessibilitySettingsTest {
@Test @Test
public void getServiceSummary_disableServiceAndHasSummary_showsCombineDisabledSummary() { public void getServiceSummary_disableServiceAndHasSummary_showsCombineDisabledSummary() {
final String service_disabled = mContext.getString( final String service_disabled = mContext.getString(
R.string.off); R.string.accessibility_summary_state_disabled);
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any()); doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext, final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,

View File

@@ -80,7 +80,7 @@ public final class AccessibilityUtilTest {
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY); final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
assertThat(result) assertThat(result)
.isEqualTo(mContext.getText(R.string.on)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_on));
} }
@Test @Test
@@ -90,7 +90,7 @@ public final class AccessibilityUtilTest {
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY); final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
assertThat(result) assertThat(result)
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
} }
@Test @Test
@@ -98,7 +98,7 @@ public final class AccessibilityUtilTest {
final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY); final CharSequence result = AccessibilityUtil.getSummary(mContext, SECURE_TEST_KEY);
assertThat(result) assertThat(result)
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
} }
@Test @Test

View File

@@ -60,7 +60,7 @@ public class AutoclickPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF); Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
} }
@Test @Test

View File

@@ -58,7 +58,7 @@ public class CaptioningPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, ON); Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, ON);
assertThat(mController.getSummary()).isEqualTo( assertThat(mController.getSummary()).isEqualTo(
mContext.getText(R.string.on)); mContext.getText(R.string.accessibility_feature_state_on));
} }
@Test @Test
@@ -67,6 +67,6 @@ public class CaptioningPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, OFF); Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, OFF);
assertThat(mController.getSummary()).isEqualTo( assertThat(mController.getSummary()).isEqualTo(
mContext.getText(R.string.off)); mContext.getText(R.string.accessibility_feature_state_off));
} }
} }

View File

@@ -52,7 +52,7 @@ public class ColorInversionPreferenceControllerTest {
DISPLAY_INVERSION_ENABLED, State.ON); DISPLAY_INVERSION_ENABLED, State.ON);
assertThat(mController.getSummary().toString().contains( assertThat(mController.getSummary().toString().contains(
mContext.getText(R.string.on))).isTrue(); mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
} }
@Test @Test
@@ -61,7 +61,7 @@ public class ColorInversionPreferenceControllerTest {
DISPLAY_INVERSION_ENABLED, State.OFF); DISPLAY_INVERSION_ENABLED, State.OFF);
assertThat(mController.getSummary().toString().contains( assertThat(mController.getSummary().toString().contains(
mContext.getText(R.string.off))).isTrue(); mContext.getText(R.string.accessibility_feature_state_off))).isTrue();
} }
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)

View File

@@ -50,7 +50,7 @@ public class DaltonizerPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, ON); Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, ON);
assertThat(mController.getSummary().toString().contains( assertThat(mController.getSummary().toString().contains(
mContext.getText(R.string.on))).isTrue(); mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
} }
@Test @Test
@@ -59,6 +59,6 @@ public class DaltonizerPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, OFF); Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, OFF);
assertThat(mController.getSummary().toString().contains( assertThat(mController.getSummary().toString().contains(
mContext.getText(R.string.off))).isTrue(); mContext.getText(R.string.accessibility_feature_state_off))).isTrue();
} }
} }

View File

@@ -64,13 +64,13 @@ public class MagnificationGesturesPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, ON); Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, ON);
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.on)); .isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, OFF); Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, OFF);
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
} }
@Test @Test

View File

@@ -89,13 +89,13 @@ public class MagnificationNavbarPreferenceControllerTest {
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, ON); Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, ON);
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getText(R.string.on)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_on));
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, OFF); Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, OFF);
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
} }
@Test @Test

View File

@@ -92,7 +92,7 @@ public class VibrationPreferenceControllerTest {
controller.updateState(mPreference); controller.updateState(mPreference);
assertThat(mPreference.getSummary().toString()).isEqualTo( assertThat(mPreference.getSummary().toString()).isEqualTo(
mContext.getString(R.string.on)); mContext.getString(R.string.accessibility_vibration_settings_state_on));
} }
@Test @Test
@@ -103,7 +103,7 @@ public class VibrationPreferenceControllerTest {
controller.updateState(mPreference); controller.updateState(mPreference);
assertThat(mPreference.getSummary().toString()).isEqualTo( assertThat(mPreference.getSummary().toString()).isEqualTo(
mContext.getString(R.string.on)); mContext.getString(R.string.accessibility_vibration_settings_state_on));
} }
@Test @Test
@@ -114,7 +114,7 @@ public class VibrationPreferenceControllerTest {
controller.updateState(mPreference); controller.updateState(mPreference);
assertThat(mPreference.getSummary().toString()).isEqualTo( assertThat(mPreference.getSummary().toString()).isEqualTo(
mContext.getString(R.string.off)); mContext.getString(R.string.accessibility_vibration_settings_state_off));
} }
private VibrationPreferenceController createPreferenceController() { private VibrationPreferenceController createPreferenceController() {

View File

@@ -73,7 +73,7 @@ public class BackupDataPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.on)); .isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
} }
@Test @Test
@@ -83,7 +83,7 @@ public class BackupDataPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
} }
@Test @Test

View File

@@ -90,7 +90,7 @@ public class BackupSettingsHelperTest {
String backupSummary = mBackupSettingsHelper.getSummary(); String backupSummary = mBackupSettingsHelper.getSummary();
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.on)); assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_on));
} }
@Test @Test
@@ -100,7 +100,7 @@ public class BackupSettingsHelperTest {
String backupSummary = mBackupSettingsHelper.getSummary(); String backupSummary = mBackupSettingsHelper.getSummary();
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.off)); assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_off));
} }
@Test @Test

View File

@@ -132,7 +132,7 @@ public class BluetoothSummaryUpdaterTest {
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF);
verify(mListener).onSummaryChanged(mContext.getString(R.string.off)); verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
} }
@Test @Test
@@ -197,12 +197,12 @@ public class BluetoothSummaryUpdaterTest {
mShadowBluetoothAdapter.setEnabled(false); mShadowBluetoothAdapter.setEnabled(false);
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF);
verify(mListener).onSummaryChanged(mContext.getString(R.string.off)); verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
// Turning ON means not enabled // Turning ON means not enabled
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_TURNING_ON); mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_TURNING_ON);
// There should still be only one invocation of disabled message // There should still be only one invocation of disabled message
verify(mListener).onSummaryChanged(mContext.getString(R.string.off)); verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
mShadowBluetoothAdapter.setEnabled(true); mShadowBluetoothAdapter.setEnabled(true);
mDeviceConnected[0] = false; mDeviceConnected[0] = false;

View File

@@ -92,13 +92,13 @@ public class NfcAndPaymentFragmentControllerTest {
public void getSummary_nfcOn_shouldProvideOnSummary() { public void getSummary_nfcOn_shouldProvideOnSummary() {
mShadowNfcAdapter.setEnabled(true); mShadowNfcAdapter.setEnabled(true);
assertThat(mController.getSummary().toString()).contains( assertThat(mController.getSummary().toString()).contains(
mContext.getString(R.string.on)); mContext.getString(R.string.switch_on_text));
} }
@Test @Test
public void getSummary_nfcOff_shouldProvideOffSummary() { public void getSummary_nfcOff_shouldProvideOffSummary() {
mShadowNfcAdapter.setEnabled(false); mShadowNfcAdapter.setEnabled(false);
assertThat(mController.getSummary().toString()).contains( assertThat(mController.getSummary().toString()).contains(
mContext.getString(R.string.off)); mContext.getString(R.string.switch_off_text));
} }
} }

View File

@@ -109,7 +109,7 @@ public class AutoBrightnessPreferenceControllerTest {
mController.setChecked(true); mController.setChecked(true);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getText(R.string.on)); .isEqualTo(mContext.getText(R.string.auto_brightness_summary_on));
} }
@Test @Test
@@ -117,7 +117,7 @@ public class AutoBrightnessPreferenceControllerTest {
mController.setChecked(false); mController.setChecked(false);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.auto_brightness_summary_off));
} }
@Test @Test

View File

@@ -86,9 +86,9 @@ public class SmartAutoRotatePreferenceControllerTest {
doReturn(PACKAGE_NAME).when(mPackageManager).getRotationResolverPackageName(); doReturn(PACKAGE_NAME).when(mPackageManager).getRotationResolverPackageName();
doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission( doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission(
Manifest.permission.CAMERA, PACKAGE_NAME); Manifest.permission.CAMERA, PACKAGE_NAME);
when(mContext.getString(R.string.off)) when(mContext.getString(R.string.auto_rotate_option_off))
.thenReturn("Off"); .thenReturn("Off");
when(mContext.getString(R.string.on)) when(mContext.getString(R.string.auto_rotate_option_on))
.thenReturn("On"); .thenReturn("On");
when(mContext.getString(R.string.auto_rotate_option_face_based)) when(mContext.getString(R.string.auto_rotate_option_face_based))
.thenReturn("On - Face-based"); .thenReturn("On - Face-based");

View File

@@ -67,7 +67,7 @@ public class OneHandedEnablePreferenceControllerTest {
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true); OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getText(R.string.on)); .isEqualTo(mContext.getText(R.string.switch_on_text));
} }
@Test @Test
@@ -75,6 +75,6 @@ public class OneHandedEnablePreferenceControllerTest {
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false); OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getText(R.string.off)); .isEqualTo(mContext.getText(R.string.switch_off_text));
} }
} }

View File

@@ -137,7 +137,7 @@ public class PreventRingingParentPreferenceControllerTest {
VOLUME_HUSH_OFF); VOLUME_HUSH_OFF);
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText( assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText(
R.string.off)); R.string.switch_off_text));
} }
@Test @Test

View File

@@ -97,7 +97,7 @@ public class SpellCheckerPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mAppContext.getString(R.string.off)); .isEqualTo(mAppContext.getString(R.string.switch_off_text));
} }
@Test @Test

View File

@@ -97,7 +97,7 @@ public class LocationForWorkPreferenceControllerTest {
verify(mUserManager) verify(mUserManager)
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, false, mUserHandle); .setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, false, mUserHandle);
verify(mPreference).setSummary(R.string.on); verify(mPreference).setSummary(R.string.switch_on_text);
} }
@Test @Test
@@ -109,7 +109,7 @@ public class LocationForWorkPreferenceControllerTest {
verify(mUserManager) verify(mUserManager)
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, mUserHandle); .setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, mUserHandle);
verify(mPreference).setSummary(R.string.off); verify(mPreference).setSummary(R.string.switch_off_text);
} }
@Test @Test
@@ -147,7 +147,7 @@ public class LocationForWorkPreferenceControllerTest {
mController.onLocationModeChanged(Settings.Secure.LOCATION_MODE_BATTERY_SAVING, false); mController.onLocationModeChanged(Settings.Secure.LOCATION_MODE_BATTERY_SAVING, false);
verify(mPreference).setEnabled(true); verify(mPreference).setEnabled(true);
verify(mPreference).setSummary(R.string.on); verify(mPreference).setSummary(R.string.switch_on_text);
} }
@Test @Test

View File

@@ -53,7 +53,7 @@ public class TopLevelLocationPreferenceControllerTest {
public void getSummary_whenLocationIsOff_shouldReturnStringForOff() { public void getSummary_whenLocationIsOff_shouldReturnStringForOff() {
mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle());
assertThat(mController.getSummary()).isEqualTo( assertThat(mController.getSummary()).isEqualTo(
mContext.getString(R.string.off)); mContext.getString(R.string.location_settings_summary_location_off));
} }
@Test @Test

View File

@@ -74,7 +74,7 @@ public class AdaptiveConnectivityPreferenceControllerTest {
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1); Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 1);
assertThat(mController.getSummary()).isEqualTo(mContext.getString(R.string.on)); assertThat(mController.getSummary()).isEqualTo(mContext.getString(R.string.switch_on_text));
} }
@Test @Test
@@ -83,6 +83,6 @@ public class AdaptiveConnectivityPreferenceControllerTest {
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 0); Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 0);
assertThat(mController.getSummary()) assertThat(mController.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.switch_off_text));
} }
} }

View File

@@ -224,7 +224,7 @@ public class PrivateDnsPreferenceControllerTest {
when(lp.getValidatedPrivateDnsServers()).thenReturn(NON_EMPTY_ADDRESS_LIST); when(lp.getValidatedPrivateDnsServers()).thenReturn(NON_EMPTY_ADDRESS_LIST);
updateLinkProperties(lp); updateLinkProperties(lp);
mController.updateState(mPreference); mController.updateState(mPreference);
verify(mPreference).setSummary(getResourceString(R.string.on)); verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_on));
reset(mPreference); reset(mPreference);
lp = mock(LinkProperties.class); lp = mock(LinkProperties.class);

View File

@@ -141,7 +141,7 @@ public class TetherPreferenceControllerTest {
when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"456"}); when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"456"});
mController.updateSummary(); mController.updateSummary();
verify(mPreference).setSummary(R.string.off); verify(mPreference).setSummary(R.string.switch_off_text);
} }
@Test @Test
@@ -172,7 +172,7 @@ public class TetherPreferenceControllerTest {
ReflectionHelpers.getField(mController, "mAirplaneModeObserver"); ReflectionHelpers.getField(mController, "mAirplaneModeObserver");
observer.onChange(true, Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON)); observer.onChange(true, Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON));
verify(mPreference).setSummary(R.string.off); verify(mPreference).setSummary(R.string.switch_off_text);
} }
@Test @Test

View File

@@ -145,7 +145,7 @@ public class PrintSettingsPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.print_settings_summary_no_service));
} }
@Test @Test

View File

@@ -76,7 +76,7 @@ public class ScreenPinningPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.switch_off_text));
} }
@Test @Test
@@ -87,7 +87,7 @@ public class ScreenPinningPreferenceControllerTest {
mController.updateState(mPreference); mController.updateState(mPreference);
assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary())
.isEqualTo(mContext.getString(R.string.on)); .isEqualTo(mContext.getString(R.string.switch_on_text));
} }
@Test @Test

View File

@@ -55,8 +55,8 @@ public class SwitchBarTest {
@Test @Test
public void cycleChecked_defaultLabel_shouldUpdateTextAndBackground() { public void cycleChecked_defaultLabel_shouldUpdateTextAndBackground() {
final int defaultOnText = R.string.on; final int defaultOnText = R.string.switch_on_text;
final int defaultOffText = R.string.off; final int defaultOffText = R.string.switch_off_text;
assertThat(((TextView) mBar.findViewById(R.id.switch_text)).getText()) assertThat(((TextView) mBar.findViewById(R.id.switch_text)).getText())
.isEqualTo(mContext.getString(defaultOffText)); .isEqualTo(mContext.getString(defaultOffText));

View File

@@ -110,7 +110,7 @@ public class WifiSummaryUpdaterTest {
mWifiTracker.enabled = false; mWifiTracker.enabled = false;
assertThat(mSummaryUpdater.getSummary()) assertThat(mSummaryUpdater.getSummary())
.isEqualTo(mContext.getString(R.string.off)); .isEqualTo(mContext.getString(R.string.switch_off_text));
} }
@Test @Test