Snap for 9762093 from 813f654aa1 to udc-release
Change-Id: Id5ffd44ebbdb70717045bbf67eb9a3c87c22714e
This commit is contained in:
@@ -186,9 +186,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/today_header"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/notification_history_today"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="@style/TextAppearance.HomepageCardTitle"
|
||||
android:paddingBottom="16dp" />
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp"
|
||||
android:textOff="@string/off"
|
||||
android:textOn="@string/on"
|
||||
android:textOff="@string/tare_off"
|
||||
android:textOn="@string/tare_on"
|
||||
android:showText="true"
|
||||
android:background="?android:attr/colorBackground" />
|
||||
<TextView
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
|
||||
<!-- Bluetooth audio routing settings: Titles for audio routing options -->
|
||||
<string-array name="bluetooth_audio_routing_titles">
|
||||
<item>Decide automatically</item>
|
||||
<item>Use app default</item>
|
||||
<item>Play on hearing device</item>
|
||||
<item>Play on phone speaker</item>
|
||||
</string-array>
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
<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>
|
||||
@@ -137,22 +133,20 @@
|
||||
<!-- Connected devices settings. Title of the preference to show the entrance of the audio output page. It can change different types of audio are played on phone or other bluetooth devices. [CHAR LIMIT=35] -->
|
||||
<string name="bluetooth_audio_routing_title">Audio output</string>
|
||||
<!-- Connected devices settings. Summary of the preference to show the entrance of the audio output page. [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_audio_routing_summary">Choose whether different types of audio are played on your hearing device or phone speaker</string>
|
||||
<string name="bluetooth_audio_routing_summary">Route sounds to your hearing device or phone speaker</string>
|
||||
<!-- Title for related tools section. This section will list related tools below. [CHAR LIMIT=15] -->
|
||||
<string name="bluetooth_screen_related">Related</string>
|
||||
|
||||
<!-- Bluetooth audio output settings. Title of the option managing ringtone audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_ringtone_title">Ringtone</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option managing ringtone and alarms audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_ringtone_title">Ringtone and alarms</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option managing call audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_call_title">Call</string>
|
||||
<string name="bluetooth_call_title">Audio during calls</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option managing media audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_media_title">Media</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option managing system sounds audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_system_sounds_title">System sounds</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option to play audio on hearing aids. [CHAR LIMIT=40] -->
|
||||
<string name="bluetooth_audio_path_hearing_device_title">Play on hearing device</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option to play audio on phone speaker. [CHAR LIMIT=40] -->
|
||||
<string name="bluetooth_audio_path_phone_speaker_title">Play on phone speaker</string>
|
||||
<!-- Bluetooth audio output settings. Title of the option managing system sounds related audio path. [CHAR LIMIT=30] -->
|
||||
<string name="bluetooth_system_sounds_title">Notifications and other system sounds</string>
|
||||
<!-- Description for text in accessibility hearing aids footer. [CHAR LIMIT=NONE] -->
|
||||
<string name="bluetooth_audio_routing_footer_summary">By default, audio output is determined by individual apps</string>
|
||||
|
||||
<!--Bluetooth settings screen, summary text for Bluetooth device with no name -->
|
||||
<string name="bluetooth_device">Unnamed Bluetooth device</string>
|
||||
@@ -567,6 +561,8 @@
|
||||
<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]-->
|
||||
<string name="location_settings_summary_location_on">{count, plural,
|
||||
=1 {On - # app has access to location}
|
||||
@@ -1601,6 +1597,8 @@
|
||||
<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>
|
||||
<!-- 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] -->
|
||||
@@ -2200,6 +2198,8 @@
|
||||
<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 wifi calling needs activation [CHAR LIMIT=NONE] -->
|
||||
<string name="wifi_calling_settings_activation_instructions">Activate Wi\u2011Fi Calling</string>
|
||||
@@ -2233,6 +2233,10 @@
|
||||
<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] -->
|
||||
@@ -2270,6 +2274,10 @@
|
||||
<string name="auto_brightness_title">Adaptive brightness</string>
|
||||
<!-- 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>
|
||||
<!-- 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] -->
|
||||
<string name="display_white_balance_title">Display white balance</string>
|
||||
@@ -2471,6 +2479,7 @@
|
||||
<string name="sim_lock_settings">SIM lock settings</string>
|
||||
<!-- Security & screen lock settings screen, SIM lock setting option name [CHAR LIMIT=40] -->
|
||||
<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] -->
|
||||
<string name="sim_pin_toggle">Lock SIM</string>
|
||||
<!-- SIM card lock settings screen, setting option name to change the SIM PIN [CHAR LIMIT=40] -->
|
||||
@@ -2604,6 +2613,10 @@
|
||||
<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 -->
|
||||
<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] -->
|
||||
<string name="status_meid_number">MEID</string>
|
||||
<!-- About phone, status item title. The ICCID of the current LTE device. [CHAR LIMIT=30] -->
|
||||
@@ -4506,6 +4519,10 @@
|
||||
<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] -->
|
||||
@@ -4591,6 +4608,8 @@
|
||||
<string name="accessibility_hearingaid_instruction_continue_button">Continue</string>
|
||||
<!-- Title for the accessibility preference for hearing devices. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_hearingaid_title">Hearing devices</string>
|
||||
<!-- Introduction for the Hearing devices page to introduce feature. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_hearingaid_intro">You can use hearing aids, cochlear implants, and other amplification devices with your phone</string>
|
||||
<!-- Summary for the accessibility preference for hearing aid when not connected. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_hearingaid_not_connected_summary">No hearing aids connected</string>
|
||||
<!-- Summary for the accessibility preference for hearing aid when adding new devices. [CHAR LIMIT=50] -->
|
||||
@@ -4622,9 +4641,9 @@
|
||||
<!-- Title for the Hearing Aid Compatibility preference in the accessibility page. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_hac_mode_title">Hearing aid compatibility</string>
|
||||
<!--Summary for the Hearing Aid Compatibility preference in the accessibility page. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_hac_mode_summary">Improve audio for some hearing devices</string>
|
||||
<string name="accessibility_hac_mode_summary">Improves compatibility with telecoils and reduces unwanted noise</string>
|
||||
<!-- Description for text in accessibility hearing aids footer. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_hearing_device_footer_summary">Make sure your hearing devices are turned on and in pairing mode</string>
|
||||
<string name="accessibility_hearing_device_footer_summary">Make sure your hearing device is turned on and ready to pair</string>
|
||||
<!-- Title for the pair hearing device page. [CHAR LIMIT=25] -->
|
||||
<string name="accessibility_hearing_device_pairing_page_title">Pair hearing device</string>
|
||||
<!-- Title for the preference category containing the list of the available hearing during and after bluetooth scanning devices. [CHAR LIMIT=30] -->
|
||||
@@ -4632,7 +4651,7 @@
|
||||
<!-- Title for the preference category containing the all bluetooth devices during and after bluetooth scanning devices. Used when people can not find their hearing device in hearing device pairing list. [CHAR LIMIT=45] -->
|
||||
<string name="accessibility_found_all_devices">Don\u2019t see your hearing device?</string>
|
||||
<!-- Title for listing all bluetooth devices preference in the accessibility page. [CHAR LIMIT=40] -->
|
||||
<string name="accessibility_list_all_devices_title">View all Bluetooth devices</string>
|
||||
<string name="accessibility_list_all_devices_title">See more devices</string>
|
||||
|
||||
<!-- Title for the accessibility audio adjustment page. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_audio_adjustment_title">Audio adjustment</string>
|
||||
@@ -4648,6 +4667,10 @@
|
||||
<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). -->
|
||||
@@ -4716,6 +4739,11 @@
|
||||
<!-- 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] -->
|
||||
@@ -4885,7 +4913,7 @@
|
||||
<!-- List of synonyms used in the settings search bar to find the “Autoclick(dwell timing)”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_auto_click">motor, mouse</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Hearing aids”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_hearing_aids">hard of hearing, hearing loss</string>
|
||||
<string name="keywords_hearing_aids">hearing aids, hard of hearing, hearing loss, cochlear implants, amplification devices, sound processors</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Real-time text (RTT)”. [CHAR LIMIT=NONE] -->
|
||||
<string name="keywords_rtt">hard of hearing, hearing loss, captions, Teletype, tty</string>
|
||||
<!-- List of synonyms used in the settings search bar to find the “Voice Access”. [CHAR LIMIT=NONE] -->
|
||||
@@ -4897,6 +4925,8 @@
|
||||
<string name="print_settings">Printing</string>
|
||||
|
||||
<!-- 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,
|
||||
=1 {1 print service on}
|
||||
other {# print services on}
|
||||
@@ -4923,6 +4953,11 @@
|
||||
<!-- 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>
|
||||
|
||||
@@ -5544,6 +5579,10 @@
|
||||
<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 for adaptive connectivity main switch preferences. [CHAR LIMIT=50] -->
|
||||
<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 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 -->
|
||||
@@ -5722,7 +5765,7 @@
|
||||
<string name="notification_log_title">Notification log</string>
|
||||
|
||||
<string name="notification_history_title">Notification history</string>
|
||||
<string name="notification_history_today">Last 24 hours</string>
|
||||
<string name="notification_history_today">Last %d hours</string>
|
||||
<string name="notification_history_snooze">Snoozed</string>
|
||||
<string name="notification_history_dismiss">Recently dismissed</string>
|
||||
|
||||
@@ -7102,6 +7145,9 @@
|
||||
<!-- 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>
|
||||
|
||||
@@ -7294,6 +7340,9 @@
|
||||
<!-- 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>
|
||||
|
||||
@@ -8423,6 +8472,19 @@
|
||||
<!-- 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 -->
|
||||
@@ -8576,7 +8638,11 @@
|
||||
<!-- 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>
|
||||
|
||||
<!-- Permissions preference summary [CHAR LIMIT=40] -->
|
||||
<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] -->
|
||||
<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>
|
||||
|
||||
@@ -9429,9 +9501,15 @@
|
||||
<!-- 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>
|
||||
|
||||
<!-- Preference title for battery usage list page[CHAR_LIMIT=50]-->
|
||||
<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] -->
|
||||
<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>
|
||||
|
||||
@@ -9813,6 +9894,10 @@
|
||||
<!-- 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 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
|
||||
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] -->
|
||||
@@ -11435,6 +11523,10 @@
|
||||
<!-- 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
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
android:key="accessibility_hearing_devices_screen"
|
||||
android:title="@string/accessibility_hearingaid_title">
|
||||
|
||||
<com.android.settingslib.widget.TopIntroPreference
|
||||
android:title="@string/accessibility_hearingaid_intro" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="available_hearing_devices"
|
||||
android:title="@string/accessibility_hearing_device_connected_title"
|
||||
@@ -40,8 +43,8 @@
|
||||
settings:controller="com.android.settings.accessibility.SavedHearingDevicePreferenceController"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="device_control_category"
|
||||
android:title="@string/accessibility_hearing_device_control">
|
||||
android:key="hearing_options_category"
|
||||
android:title="@string/accessibility_screen_option">
|
||||
<SwitchPreference
|
||||
android:key="hearing_aid_compatibility"
|
||||
android:title="@string/accessibility_hac_mode_title"
|
||||
|
||||
@@ -60,4 +60,10 @@
|
||||
android:title="@string/bluetooth_system_sounds_title"
|
||||
settings:controller="com.android.settings.bluetooth.HearingDeviceSystemSoundsRoutingPreferenceController" />
|
||||
|
||||
<com.android.settings.accessibility.AccessibilityFooterPreference
|
||||
android:key="hearing_device_footer"
|
||||
android:title="@string/bluetooth_audio_routing_footer_summary"
|
||||
android:selectable="false"
|
||||
settings:searchable="false" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -38,7 +38,7 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPreferenceFragment {
|
||||
|
||||
private static final String TAG = "AccessibilityHearingAidsFragment";
|
||||
private static final String KEY_DEVICE_CONTROL_CATEGORY = "device_control_category";
|
||||
private static final String KEY_HEARING_OPTIONS_CATEGORY = "hearing_options_category";
|
||||
private static final int FIRST_PREFERENCE_IN_CATEGORY_INDEX = -1;
|
||||
private String mFeatureName;
|
||||
|
||||
@@ -63,8 +63,8 @@ public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPrefe
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
final View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||
final PreferenceCategory controlCategory = findPreference(KEY_DEVICE_CONTROL_CATEGORY);
|
||||
// Move the preference under controlCategory need to remove the original first.
|
||||
final PreferenceCategory controlCategory = findPreference(KEY_HEARING_OPTIONS_CATEGORY);
|
||||
// To move the shortcut preference under controlCategory need to remove the original added.
|
||||
mShortcutPreference.setOrder(FIRST_PREFERENCE_IN_CATEGORY_INDEX);
|
||||
getPreferenceScreen().removePreference(mShortcutPreference);
|
||||
controlCategory.addPreference(mShortcutPreference);
|
||||
@@ -110,7 +110,8 @@ public class AccessibilityHearingAidsFragment extends AccessibilityShortcutPrefe
|
||||
|
||||
@Override
|
||||
protected boolean showGeneralCategory() {
|
||||
// Have customized category for accessibility hearings aids page.
|
||||
// Have static preference under dynamically created PreferenceCategory KEY_GENERAL_CATEGORY.
|
||||
// In order to modify that, we need to use our own PreferenceCategory for this page.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -266,8 +266,8 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
: context.getText(R.string.accessibility_summary_shortcut_disabled);
|
||||
} else {
|
||||
serviceState = serviceEnabled
|
||||
? context.getText(R.string.on)
|
||||
: context.getText(R.string.off);
|
||||
? context.getText(R.string.accessibility_summary_state_enabled)
|
||||
: context.getText(R.string.accessibility_summary_state_disabled);
|
||||
}
|
||||
|
||||
final CharSequence serviceSummary = info.loadSummary(context.getPackageManager());
|
||||
|
||||
@@ -422,7 +422,7 @@ public abstract class AccessibilityShortcutPreferenceFragment extends Restricted
|
||||
}
|
||||
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.off);
|
||||
return context.getText(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
|
||||
@@ -130,7 +130,8 @@ 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.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);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AutoclickPreferenceController extends BasePreferenceController {
|
||||
final boolean enabled = Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF) == ON;
|
||||
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(),
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,
|
||||
|
||||
@@ -87,7 +87,8 @@ public class MagnificationGesturesPreferenceController extends TogglePreferenceC
|
||||
resId = R.string.accessibility_screen_magnification_short_summary;
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -94,7 +94,8 @@ public class MagnificationNavbarPreferenceController extends TogglePreferenceCon
|
||||
resId = R.string.accessibility_screen_magnification_navbar_short_summary;
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
|
||||
}
|
||||
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.off);
|
||||
return context.getText(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
|
||||
@@ -431,7 +431,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
@Override
|
||||
protected CharSequence getShortcutTypeSummary(Context context) {
|
||||
if (!mShortcutPreference.isChecked()) {
|
||||
return context.getText(R.string.off);
|
||||
return context.getText(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
final int shortcutTypes = PreferredShortcuts.retrieveUserShortcutType(context,
|
||||
@@ -752,6 +752,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.off);
|
||||
: context.getText(R.string.accessibility_summary_shortcut_disabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ 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.on : R.string.off);
|
||||
return mContext.getText(
|
||||
isVibrateOn
|
||||
? R.string.accessibility_vibration_settings_state_on
|
||||
: R.string.accessibility_vibration_settings_state_off);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,8 @@ public class AddAccountSettings extends Activity {
|
||||
intent.putExtras(addAccountOptions)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
startActivityForResultAsUser(intent, ADD_ACCOUNT_REQUEST, mUserHandle);
|
||||
startActivityForResultAsUser(
|
||||
new Intent(intent), ADD_ACCOUNT_REQUEST, mUserHandle);
|
||||
} else {
|
||||
setResult(RESULT_OK);
|
||||
if (mPendingIntent != null) {
|
||||
|
||||
@@ -99,11 +99,11 @@ public class AppNotificationPreferenceController extends AppInfoPreferenceContro
|
||||
return "";
|
||||
}
|
||||
if (appRow.banned) {
|
||||
return context.getText(R.string.off);
|
||||
return context.getText(R.string.notifications_disabled);
|
||||
} else if (appRow.channelCount == 0) {
|
||||
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
|
||||
} else if (appRow.channelCount == appRow.blockedChannelCount) {
|
||||
return context.getText(R.string.off);
|
||||
return context.getText(R.string.notifications_disabled);
|
||||
} else {
|
||||
if (appRow.blockedChannelCount == 0) {
|
||||
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
|
||||
|
||||
@@ -54,7 +54,8 @@ public class BackupDataPreferenceController extends BasePreferenceController {
|
||||
public CharSequence getSummary() {
|
||||
if (!mPSCD.isBackupGray()) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ public class BackupSettingsHelper {
|
||||
UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
|
||||
if (userManager.getUserProfiles().size() == 1) {
|
||||
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();
|
||||
} 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.off);
|
||||
return mContext.getString(R.string.bluetooth_disabled);
|
||||
}
|
||||
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.off);
|
||||
return mContext.getString(R.string.bluetooth_disabled);
|
||||
} 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.on);
|
||||
return mContext.getText(R.string.nfc_setting_on);
|
||||
} else {
|
||||
return mContext.getText(R.string.off);
|
||||
return mContext.getText(R.string.nfc_setting_off);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class DataSaverPreference extends Preference implements DataSaverBackend.
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
@@ -57,7 +57,9 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
@@ -175,7 +175,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
int activeStringId = R.string.off;
|
||||
int activeStringId = R.string.auto_rotate_option_off;
|
||||
if (!RotationPolicy.isRotationLocked(mContext)) {
|
||||
final int cameraRotate = Settings.Secure.getIntForUser(
|
||||
mContext.getContentResolver(),
|
||||
@@ -186,7 +186,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
&& !isCameraLocked()
|
||||
&& !isPowerSaveMode()
|
||||
? R.string.auto_rotate_option_face_based
|
||||
: R.string.on;
|
||||
: R.string.auto_rotate_option_on;
|
||||
}
|
||||
return mContext.getString(activeStringId);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,8 @@ public class EmergencyGestureEntrypointPreferenceController extends BasePreferen
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(
|
||||
mEmergencyNumberUtils.getEmergencyGestureEnabled()
|
||||
? R.string.on : R.string.off);
|
||||
? R.string.gesture_setting_on
|
||||
: R.string.gesture_setting_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.on);
|
||||
return mContext.getString(R.string.battery_saver_on_summary);
|
||||
}
|
||||
|
||||
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.off);
|
||||
mContext.getString(R.string.battery_saver_off_summary);
|
||||
} else {
|
||||
return mContext.getString(R.string.battery_saver_pref_auto_routine_summary);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,8 @@ public class AssistGestureSettingsPreferenceController extends GesturePreference
|
||||
if (!mAssistOnly) {
|
||||
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
|
||||
|
||||
@@ -60,7 +60,8 @@ public abstract class GesturePreferenceController extends TogglePreferenceContro
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
@@ -51,7 +51,7 @@ public class OneHandedEnablePreferenceController extends BasePreferenceControlle
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(
|
||||
OneHandedSettingsUtils.isOneHandedModeEnabled(mContext)
|
||||
? R.string.on : R.string.off);
|
||||
? R.string.gesture_setting_on : R.string.gesture_setting_off);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -104,7 +104,7 @@ public class PreventRingingParentPreferenceController extends TogglePreferenceCo
|
||||
break;
|
||||
// VOLUME_HUSH_OFF
|
||||
default:
|
||||
summary = mContext.getText(R.string.off);
|
||||
summary = mContext.getText(R.string.switch_off_text);
|
||||
}
|
||||
preference.setEnabled(true);
|
||||
mPreference.setSwitchEnabled(true);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class SpellCheckerPreferenceController extends AbstractPreferenceControll
|
||||
return;
|
||||
}
|
||||
if (!mTextServicesManager.isSpellCheckerEnabled()) {
|
||||
preference.setSummary(R.string.off);
|
||||
preference.setSummary(R.string.switch_off_text);
|
||||
} else {
|
||||
final SpellCheckerInfo sci = mTextServicesManager.getCurrentSpellChecker();
|
||||
if (sci != null) {
|
||||
|
||||
@@ -44,7 +44,8 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
|
||||
final boolean switchState = mPreference.isChecked();
|
||||
mUserManager.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, !switchState,
|
||||
Utils.getManagedProfile(mUserManager));
|
||||
mPreference.setSummary(switchState ? R.string.on : R.string.off);
|
||||
mPreference.setSummary(switchState
|
||||
? R.string.switch_on_text : R.string.switch_off_text);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -80,11 +81,11 @@ public class LocationForWorkPreferenceController extends LocationBasePreferenceC
|
||||
mLocationEnabler.isManagedProfileRestrictedByBase();
|
||||
if (isRestrictedByBase || !enabled) {
|
||||
mPreference.setChecked(false);
|
||||
summaryResId = enabled ? R.string.off
|
||||
summaryResId = enabled ? R.string.switch_off_text
|
||||
: R.string.location_app_permission_summary_location_off;
|
||||
} else {
|
||||
mPreference.setChecked(true);
|
||||
summaryResId = R.string.on;
|
||||
summaryResId = R.string.switch_on_text;
|
||||
}
|
||||
mPreference.setSummary(summaryResId);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ public class LocationServicesBluetoothScanningPreferenceController extends
|
||||
public CharSequence getSummary() {
|
||||
final boolean bleScanOn = Settings.Global.getInt(mContext.getContentResolver(),
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ public class LocationServicesWifiScanningPreferenceController extends BasePrefer
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class TopLevelLocationPreferenceController extends BasePreferenceControll
|
||||
}
|
||||
return sSummary;
|
||||
} else {
|
||||
return mContext.getString(R.string.off);
|
||||
return mContext.getString(R.string.location_settings_summary_location_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.on)
|
||||
: mContext.getString(R.string.off);
|
||||
? mContext.getString(R.string.adaptive_connectivity_switch_on)
|
||||
: mContext.getString(R.string.adaptive_connectivity_switch_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.on)
|
||||
return dnsesResolved ? res.getString(R.string.private_dns_mode_on)
|
||||
: res.getString(R.string.private_dns_mode_opportunistic);
|
||||
case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
|
||||
return dnsesResolved
|
||||
|
||||
@@ -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.off);
|
||||
mPreference.setSummary(R.string.android_beam_off_summary);
|
||||
}
|
||||
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.off);
|
||||
: R.string.switch_off_text);
|
||||
}
|
||||
|
||||
@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.off);
|
||||
return mContext.getString(R.string.spatial_summary_off);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,15 +127,13 @@ public class AppConversationListPreferenceController extends NotificationPrefere
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mConversations.isEmpty()) {
|
||||
// TODO: if preference has children, compare with newly loaded list
|
||||
mPreference.removeAll();
|
||||
mPreference.setTitle(getTitleResId());
|
||||
populateConversations();
|
||||
}
|
||||
mPreference.setTitle(getTitleResId());
|
||||
populateConversations();
|
||||
}
|
||||
|
||||
private void populateConversations() {
|
||||
mPreference.removeAll();
|
||||
mPreference.setVisible(!mConversations.isEmpty());
|
||||
for (ConversationChannelWrapper conversation : mConversations) {
|
||||
if (conversation.getNotificationChannel().isDemoted()) {
|
||||
continue;
|
||||
|
||||
@@ -78,6 +78,7 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity {
|
||||
// R.integer.config_notificationServiceArchiveSize, which is the Number of notifications kept
|
||||
// in the notification service historical archive
|
||||
private static final int MAX_RECENT_DISMISS_ITEM_COUNT = 50;
|
||||
private static final int HISTORY_HOURS = 24;
|
||||
|
||||
private ViewGroup mHistoryOn;
|
||||
private ViewGroup mHistoryOff;
|
||||
@@ -243,6 +244,8 @@ public class NotificationHistoryActivity extends CollapsingToolbarBaseActivity {
|
||||
mHistoryOn = findViewById(R.id.history_on);
|
||||
mHistoryEmpty = findViewById(R.id.history_on_empty);
|
||||
mSwitchBar = findViewById(R.id.main_switch_bar);
|
||||
((TextView) findViewById(R.id.today_header)).setText(
|
||||
getString(R.string.notification_history_today, HISTORY_HOURS));
|
||||
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
|
||||
@@ -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.on);
|
||||
return mContext.getString(R.string.zen_mode_sound_summary_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.on : R.string.off;
|
||||
return allow ? R.string.zen_mode_sound_summary_on : R.string.switch_off_text;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -165,7 +165,7 @@ public class ZenRulePreference extends PrimarySwitchPreference {
|
||||
}
|
||||
|
||||
return (rule == null || !rule.isEnabled())
|
||||
? mContext.getResources().getString(R.string.off)
|
||||
: mContext.getResources().getString(R.string.on);
|
||||
? mContext.getResources().getString(R.string.switch_off_text)
|
||||
: mContext.getResources().getString(R.string.switch_on_text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,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.off);
|
||||
return mContext.getText(R.string.print_settings_summary_no_service);
|
||||
} else {
|
||||
return StringUtil.getIcuPluralsString(mContext, services.size(),
|
||||
R.string.print_settings_summary);
|
||||
|
||||
@@ -204,9 +204,9 @@ public class PrintSettingsFragment extends ProfileSettingsPreferenceFragment
|
||||
preference.setPersistent(false);
|
||||
|
||||
if (service.isEnabled()) {
|
||||
preference.setSummary(getString(R.string.on));
|
||||
preference.setSummary(getString(R.string.print_feature_state_on));
|
||||
} else {
|
||||
preference.setSummary(getString(R.string.off));
|
||||
preference.setSummary(getString(R.string.print_feature_state_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.on)
|
||||
: mContext.getText(R.string.off);
|
||||
? mContext.getText(R.string.screen_pinning_switch_on_text)
|
||||
: mContext.getText(R.string.screen_pinning_switch_off_text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,8 +92,11 @@ class SpaLogData(val id: String, val event: LogEvent,
|
||||
return null
|
||||
}
|
||||
|
||||
fun getAction(): Int {
|
||||
return event.action
|
||||
fun getAction(): Int = when (event) {
|
||||
LogEvent.PAGE_ENTER -> SettingsEnums.PAGE_VISIBLE
|
||||
LogEvent.PAGE_LEAVE -> SettingsEnums.PAGE_HIDE
|
||||
LogEvent.ENTRY_CLICK -> SettingsEnums.ACTION_SETTINGS_TILE_CLICK
|
||||
LogEvent.ENTRY_SWITCH -> SettingsEnums.ACTION_SETTINGS_PREFERENCE_CHANGE
|
||||
}
|
||||
|
||||
//TODO(b/253979024): Will be implemented in subsequent CLs.
|
||||
|
||||
@@ -134,7 +134,7 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
|
||||
lp.setMarginEnd(switchBarMarginEnd);
|
||||
setBackgroundColor(mBackgroundColor);
|
||||
|
||||
setSwitchBarText(R.string.on, R.string.off);
|
||||
setSwitchBarText(R.string.switch_on_text, R.string.switch_off_text);
|
||||
|
||||
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.off);
|
||||
return mContext.getString(R.string.switch_off_text);
|
||||
}
|
||||
if (!mWifiTracker.connected) {
|
||||
return mContext.getString(R.string.disconnected);
|
||||
|
||||
@@ -194,7 +194,7 @@ public class AccessibilitySettingsTest {
|
||||
mServiceInfo, SERVICE_ENABLED);
|
||||
|
||||
assertThat(summary).isEqualTo(
|
||||
mContext.getString(R.string.on));
|
||||
mContext.getString(R.string.accessibility_summary_state_enabled));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -205,13 +205,13 @@ public class AccessibilitySettingsTest {
|
||||
mServiceInfo, SERVICE_DISABLED);
|
||||
|
||||
assertThat(summary).isEqualTo(
|
||||
mContext.getString(R.string.off));
|
||||
mContext.getString(R.string.accessibility_summary_state_disabled));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getServiceSummary_enableServiceAndHasSummary_showsEnabledSummary() {
|
||||
final String service_enabled = mContext.getString(
|
||||
R.string.on);
|
||||
R.string.accessibility_summary_state_enabled);
|
||||
doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
|
||||
|
||||
final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,
|
||||
@@ -225,7 +225,7 @@ public class AccessibilitySettingsTest {
|
||||
@Test
|
||||
public void getServiceSummary_disableServiceAndHasSummary_showsCombineDisabledSummary() {
|
||||
final String service_disabled = mContext.getString(
|
||||
R.string.off);
|
||||
R.string.accessibility_summary_state_disabled);
|
||||
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.on));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_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.off));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_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.off));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AutoclickPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, OFF);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -58,7 +58,7 @@ public class CaptioningPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, ON);
|
||||
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getText(R.string.on));
|
||||
mContext.getText(R.string.accessibility_feature_state_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,6 +67,6 @@ public class CaptioningPreferenceControllerTest {
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED, OFF);
|
||||
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getText(R.string.off));
|
||||
mContext.getText(R.string.accessibility_feature_state_off));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ColorInversionPreferenceControllerTest {
|
||||
DISPLAY_INVERSION_ENABLED, State.ON);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.on))).isTrue();
|
||||
mContext.getText(R.string.accessibility_feature_state_on))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -61,7 +61,7 @@ public class ColorInversionPreferenceControllerTest {
|
||||
DISPLAY_INVERSION_ENABLED, State.OFF);
|
||||
|
||||
assertThat(mController.getSummary().toString().contains(
|
||||
mContext.getText(R.string.off))).isTrue();
|
||||
mContext.getText(R.string.accessibility_feature_state_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.on))).isTrue();
|
||||
mContext.getText(R.string.accessibility_feature_state_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.off))).isTrue();
|
||||
mContext.getText(R.string.accessibility_feature_state_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.on));
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
|
||||
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, OFF);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_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.on));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_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.off));
|
||||
.isEqualTo(mContext.getText(R.string.accessibility_feature_state_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -92,7 +92,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.on));
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -103,7 +103,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.on));
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -114,7 +114,7 @@ public class VibrationPreferenceControllerTest {
|
||||
controller.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary().toString()).isEqualTo(
|
||||
mContext.getString(R.string.off));
|
||||
mContext.getString(R.string.accessibility_vibration_settings_state_off));
|
||||
}
|
||||
|
||||
private VibrationPreferenceController createPreferenceController() {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class BackupDataPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.on));
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -83,7 +83,7 @@ public class BackupDataPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
.isEqualTo(mContext.getString(R.string.accessibility_feature_state_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -90,7 +90,7 @@ public class BackupSettingsHelperTest {
|
||||
|
||||
String backupSummary = mBackupSettingsHelper.getSummary();
|
||||
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.on));
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,7 +100,7 @@ public class BackupSettingsHelperTest {
|
||||
|
||||
String backupSummary = mBackupSettingsHelper.getSummary();
|
||||
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.off));
|
||||
assertThat(backupSummary).isEqualTo(mContext.getString(R.string.backup_summary_state_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -132,7 +132,7 @@ public class BluetoothSummaryUpdaterTest {
|
||||
|
||||
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF);
|
||||
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.off));
|
||||
verify(mListener).onSummaryChanged(mContext.getString(R.string.bluetooth_disabled));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -197,12 +197,12 @@ public class BluetoothSummaryUpdaterTest {
|
||||
|
||||
mShadowBluetoothAdapter.setEnabled(false);
|
||||
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
|
||||
mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_TURNING_ON);
|
||||
// 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);
|
||||
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.on));
|
||||
mContext.getString(R.string.switch_on_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSummary_nfcOff_shouldProvideOffSummary() {
|
||||
mShadowNfcAdapter.setEnabled(false);
|
||||
assertThat(mController.getSummary().toString()).contains(
|
||||
mContext.getString(R.string.off));
|
||||
mContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public class AutoBrightnessPreferenceControllerTest {
|
||||
mController.setChecked(true);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
.isEqualTo(mContext.getText(R.string.auto_brightness_summary_on));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -117,7 +117,7 @@ public class AutoBrightnessPreferenceControllerTest {
|
||||
mController.setChecked(false);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
.isEqualTo(mContext.getText(R.string.auto_brightness_summary_off));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -86,9 +86,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.off))
|
||||
when(mContext.getString(R.string.auto_rotate_option_off))
|
||||
.thenReturn("Off");
|
||||
when(mContext.getString(R.string.on))
|
||||
when(mContext.getString(R.string.auto_rotate_option_on))
|
||||
.thenReturn("On");
|
||||
when(mContext.getString(R.string.auto_rotate_option_face_based))
|
||||
.thenReturn("On - Face-based");
|
||||
|
||||
@@ -67,7 +67,7 @@ public class OneHandedEnablePreferenceControllerTest {
|
||||
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, true);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.on));
|
||||
.isEqualTo(mContext.getText(R.string.switch_on_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -75,6 +75,6 @@ public class OneHandedEnablePreferenceControllerTest {
|
||||
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getText(R.string.off));
|
||||
.isEqualTo(mContext.getText(R.string.switch_off_text));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class PreventRingingParentPreferenceControllerTest {
|
||||
VOLUME_HUSH_OFF);
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary()).isEqualTo(mContext.getResources().getText(
|
||||
R.string.off));
|
||||
R.string.switch_off_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -97,7 +97,7 @@ public class SpellCheckerPreferenceControllerTest {
|
||||
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mAppContext.getString(R.string.off));
|
||||
.isEqualTo(mAppContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -97,7 +97,7 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
|
||||
verify(mUserManager)
|
||||
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, false, mUserHandle);
|
||||
verify(mPreference).setSummary(R.string.on);
|
||||
verify(mPreference).setSummary(R.string.switch_on_text);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -109,7 +109,7 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
|
||||
verify(mUserManager)
|
||||
.setUserRestriction(UserManager.DISALLOW_SHARE_LOCATION, true, mUserHandle);
|
||||
verify(mPreference).setSummary(R.string.off);
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
@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.on);
|
||||
verify(mPreference).setSummary(R.string.switch_on_text);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -53,7 +53,7 @@ public class TopLevelLocationPreferenceControllerTest {
|
||||
public void getSummary_whenLocationIsOff_shouldReturnStringForOff() {
|
||||
mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle());
|
||||
assertThat(mController.getSummary()).isEqualTo(
|
||||
mContext.getString(R.string.off));
|
||||
mContext.getString(R.string.location_settings_summary_location_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.on));
|
||||
assertThat(mController.getSummary()).isEqualTo(mContext.getString(R.string.switch_on_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -83,6 +83,6 @@ public class AdaptiveConnectivityPreferenceControllerTest {
|
||||
Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED, 0);
|
||||
|
||||
assertThat(mController.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.on));
|
||||
verify(mPreference).setSummary(getResourceString(R.string.private_dns_mode_on));
|
||||
|
||||
reset(mPreference);
|
||||
lp = mock(LinkProperties.class);
|
||||
|
||||
@@ -141,7 +141,7 @@ public class TetherPreferenceControllerTest {
|
||||
when(mTetheringManager.getTetherableWifiRegexs()).thenReturn(new String[]{"456"});
|
||||
|
||||
mController.updateSummary();
|
||||
verify(mPreference).setSummary(R.string.off);
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -172,7 +172,7 @@ public class TetherPreferenceControllerTest {
|
||||
ReflectionHelpers.getField(mController, "mAirplaneModeObserver");
|
||||
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
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.notification.app;
|
||||
|
||||
import static android.app.NotificationManager.IMPORTANCE_DEFAULT;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ParceledListSlice;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.service.notification.ConversationChannelWrapper;
|
||||
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
|
||||
import com.android.settings.notification.NotificationBackend;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.shadows.ShadowApplication;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class AppConversationListPreferenceControllerTest {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
@Mock
|
||||
private NotificationBackend mBackend;
|
||||
|
||||
private AppConversationListPreferenceController mController;
|
||||
private NotificationBackend.AppRow mAppRow;
|
||||
private PreferenceCategory mPreference;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = ApplicationProvider.getApplicationContext();
|
||||
|
||||
mAppRow = new NotificationBackend.AppRow();
|
||||
mAppRow.uid = 42;
|
||||
mAppRow.pkg = "com.example.exampling";
|
||||
|
||||
mController = new AppConversationListPreferenceController(mContext, mBackend);
|
||||
mController.onResume(mAppRow, null, null, null, null, null, new ArrayList<>());
|
||||
|
||||
mPreference = new PreferenceCategory(mContext);
|
||||
PreferenceManager preferenceManager = new PreferenceManager(mContext);
|
||||
PreferenceScreen preferenceScreen = preferenceManager.createPreferenceScreen(mContext);
|
||||
preferenceScreen.addPreference(mPreference);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_someConversations_loadsConversations() {
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid))).thenReturn(
|
||||
conversationList(
|
||||
conversationChannel("1", "msg", "Mario", "Messages", "M", false),
|
||||
conversationChannel("2", "msg", "Luigi", "Messages", "L", false)
|
||||
));
|
||||
|
||||
mController.updateState(mPreference);
|
||||
ShadowApplication.runBackgroundTasks();
|
||||
|
||||
assertThat(mPreference.isVisible()).isTrue();
|
||||
assertThat(mPreference.getPreferenceCount()).isEqualTo(2);
|
||||
assertThat(mPreference.getPreference(0).getTitle().toString()).isEqualTo("Mario");
|
||||
assertThat(mPreference.getPreference(0).getSummary().toString()).isEqualTo("Messages");
|
||||
assertThat(mPreference.getPreference(1).getTitle().toString()).isEqualTo("Luigi");
|
||||
assertThat(mPreference.getPreference(1).getSummary().toString()).isEqualTo("Messages");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_someConversations_loadsNotDemotedOnly() {
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid)))
|
||||
.thenReturn(conversationList(
|
||||
conversationChannel("1", "msg", "Mario", "Messages", "M", false),
|
||||
conversationChannel("2", "msg", "Luigi", "Messages", "L", true)
|
||||
));
|
||||
|
||||
mController.updateState(mPreference);
|
||||
ShadowApplication.runBackgroundTasks();
|
||||
|
||||
assertThat(mPreference.isVisible()).isTrue();
|
||||
assertThat(mPreference.getPreferenceCount()).isEqualTo(1);
|
||||
assertThat(mPreference.getPreference(0).getTitle().toString()).isEqualTo("Mario");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_noConversations_hides() {
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid)))
|
||||
.thenReturn(conversationList());
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.isVisible()).isFalse();
|
||||
assertThat(mPreference.getPreferenceCount()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_refreshes() {
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid)))
|
||||
.thenReturn(conversationList());
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.isVisible()).isFalse();
|
||||
|
||||
// Empty -> present
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid)))
|
||||
.thenReturn(conversationList(
|
||||
conversationChannel("1", "msg", "Mario", "Messages", "M", false)
|
||||
));
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.isVisible()).isTrue();
|
||||
assertThat(mPreference.getPreferenceCount()).isEqualTo(1);
|
||||
|
||||
// Present -> empty
|
||||
when(mBackend.getConversations(eq(mAppRow.pkg), eq(mAppRow.uid)))
|
||||
.thenReturn(conversationList());
|
||||
mController.updateState(mPreference);
|
||||
assertThat(mPreference.isVisible()).isFalse();
|
||||
assertThat(mPreference.getPreferenceCount()).isEqualTo(0);
|
||||
}
|
||||
|
||||
private static ParceledListSlice<ConversationChannelWrapper> conversationList(
|
||||
ConversationChannelWrapper... channels) {
|
||||
return new ParceledListSlice<>(Arrays.asList(channels));
|
||||
}
|
||||
|
||||
private ConversationChannelWrapper conversationChannel(String id, String parentId,
|
||||
String shortcutName, String parentLabel, String shortcutId, boolean demoted) {
|
||||
NotificationChannel channel = new NotificationChannel(id, "Channel", IMPORTANCE_DEFAULT);
|
||||
channel.setDemoted(demoted);
|
||||
channel.setConversationId(parentId, shortcutId);
|
||||
ShortcutInfo shortcutInfo = new ShortcutInfo.Builder(mContext, shortcutId).setLongLabel(
|
||||
shortcutName).build();
|
||||
|
||||
ConversationChannelWrapper ccw = new ConversationChannelWrapper();
|
||||
ccw.setPkg(mAppRow.pkg);
|
||||
ccw.setUid(mAppRow.uid);
|
||||
ccw.setNotificationChannel(channel);
|
||||
ccw.setShortcutInfo(shortcutInfo);
|
||||
ccw.setParentChannelLabel(parentLabel);
|
||||
return ccw;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public class PrintSettingsPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
.isEqualTo(mContext.getString(R.string.print_settings_summary_no_service));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ScreenPinningPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.off));
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,7 +87,7 @@ public class ScreenPinningPreferenceControllerTest {
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mContext.getString(R.string.on));
|
||||
.isEqualTo(mContext.getString(R.string.switch_on_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -55,8 +55,8 @@ public class SwitchBarTest {
|
||||
|
||||
@Test
|
||||
public void cycleChecked_defaultLabel_shouldUpdateTextAndBackground() {
|
||||
final int defaultOnText = R.string.on;
|
||||
final int defaultOffText = R.string.off;
|
||||
final int defaultOnText = R.string.switch_on_text;
|
||||
final int defaultOffText = R.string.switch_off_text;
|
||||
|
||||
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.off));
|
||||
.isEqualTo(mContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -36,6 +36,10 @@ android_test {
|
||||
// instrumented Settings app.
|
||||
],
|
||||
|
||||
errorprone: {
|
||||
javacflags: ["-Xep:CheckReturnValue:WARN"]
|
||||
},
|
||||
|
||||
// Include all test java files.
|
||||
srcs: ["src/**/*.java"],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user