Update strings for hearing device U features

Bug: 270086620
Test: flash the rom and check UI
Change-Id: Iafc1691d2a51fc1c8111059ff5b2953889b40012
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 71e16f0..02d3c9b 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -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>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0da2371..d6c069f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -137,22 +137,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>
@@ -4591,6 +4589,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 +4622,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 +4632,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>
@@ -4885,7 +4885,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] -->
diff --git a/res/xml/accessibility_hearing_aids.xml b/res/xml/accessibility_hearing_aids.xml
index 76910a0..7ff571d 100644
--- a/res/xml/accessibility_hearing_aids.xml
+++ b/res/xml/accessibility_hearing_aids.xml
@@ -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"
diff --git a/res/xml/bluetooth_audio_routing_fragment.xml b/res/xml/bluetooth_audio_routing_fragment.xml
index 79494c4..854ab3f 100644
--- a/res/xml/bluetooth_audio_routing_fragment.xml
+++ b/res/xml/bluetooth_audio_routing_fragment.xml
@@ -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>
diff --git a/src/com/android/settings/accessibility/AccessibilityHearingAidsFragment.java b/src/com/android/settings/accessibility/AccessibilityHearingAidsFragment.java
index 85783b73..89e29c4 100644
--- a/src/com/android/settings/accessibility/AccessibilityHearingAidsFragment.java
+++ b/src/com/android/settings/accessibility/AccessibilityHearingAidsFragment.java
@@ -37,7 +37,7 @@
 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;
 
@@ -62,8 +62,8 @@
     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 @@
 
     @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;
     }