Merge changes I13495cad,I3a44c4c4,I15bff230,I8a492866,Ia7ffe34a

* changes:
  [Pair hearing devices] Add pair hearing device functionality
  [Pair hearing devices] Extract common behavior in BluetoothPairingDetail into Base class
  [Pair hearing devices] Add "Hearing devices" to show connected hearing devices
  [Pair hearing devices] Add "Saved devices" to show bonded but not connected hearing devices
  [Audio routing] Setup basic structure for audio routing page
This commit is contained in:
Jason Hsu
2023-02-09 04:04:03 +00:00
committed by Android (Google) Code Review
43 changed files with 2079 additions and 470 deletions

View File

@@ -19,13 +19,25 @@
android:key="accessibility_hearing_devices_screen"
android:title="@string/accessibility_hearingaid_title">
<PreferenceCategory
android:key="available_hearing_devices"
android:title="@string/accessibility_hearing_device_connected_title"
settings:controller="com.android.settings.accessibility.AvailableHearingDevicePreferenceController"/>
<com.android.settingslib.RestrictedPreference
android:key="add_bt_devices"
android:title="@string/bluetooth_pairing_pref_title"
android:icon="@drawable/ic_add_24dp"
android:summary="@string/connected_device_add_device_summary"
android:fragment="com.android.settings.accessibility.HearingDevicePairingDetail"
settings:userRestriction="no_config_bluetooth"
settings:useAdminDisabledSummary="true" />
settings:useAdminDisabledSummary="true"
settings:controller="com.android.settings.connecteddevice.AddDevicePreferenceController"/>
<PreferenceCategory
android:key="previously_connected_hearing_devices"
android:title="@string/accessibility_hearing_device_saved_title"
settings:controller="com.android.settings.accessibility.SavedHearingDevicePreferenceController"/>
<PreferenceCategory
android:key="device_control_category"

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/bluetooth_audio_routing_title">
<com.android.settingslib.widget.TopIntroPreference
android:key="bluetooth_audio_routing_top_intro"
android:title="@string/bluetooth_audio_routing_summary"
settings:searchable="false"/>
<ListPreference
android:entries="@array/bluetooth_audio_routing_titles"
android:entryValues="@array/bluetooth_audio_routing_values"
android:summary="%s"
android:key="audio_routing_ringtone"
android:persistent="false"
android:title="@string/bluetooth_ringtone_title" />
<ListPreference
android:entries="@array/bluetooth_audio_routing_titles"
android:entryValues="@array/bluetooth_audio_routing_values"
android:summary="%s"
android:key="audio_routing_call"
android:persistent="false"
android:title="@string/bluetooth_call_title" />
<ListPreference
android:entries="@array/bluetooth_audio_routing_titles"
android:entryValues="@array/bluetooth_audio_routing_values"
android:summary="%s"
android:key="audio_routing_media"
android:persistent="false"
android:title="@string/bluetooth_media_title" />
<ListPreference
android:entries="@array/bluetooth_audio_routing_titles"
android:entryValues="@array/bluetooth_audio_routing_values"
android:summary="%s"
android:key="audio_routing_system_sounds"
android:persistent="false"
android:title="@string/bluetooth_system_sounds_title" />
</PreferenceScreen>

View File

@@ -27,7 +27,7 @@
<com.android.settings.bluetooth.BluetoothProgressCategory
android:key="available_devices"
android:title="@string/bluetooth_paired_device_title"/>
android:title="@string/bluetooth_preference_found_media_devices"/>
<com.android.settingslib.widget.FooterPreference/>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/bluetooth_pairing_pref_title">
<com.android.settings.bluetooth.BluetoothProgressCategory
android:key="available_hearing_devices"
android:title="@string/accessibility_found_hearing_devices" />
<PreferenceCategory
android:key="device_control_category"
android:title="@string/accessibility_found_all_devices">
<com.android.settingslib.RestrictedPreference
android:key="add_bt_devices"
android:title="@string/accessibility_list_all_devices_title"
android:fragment="com.android.settings.bluetooth.BluetoothPairingDetail"
settings:userRestriction="no_config_bluetooth"
settings:useAdminDisabledSummary="true" />
</PreferenceCategory>
<com.android.settings.accessibility.AccessibilityFooterPreference
android:key="hearing_device_footer"
android:title="@string/accessibility_hearing_device_footer_summary"
android:selectable="false"
settings:searchable="false" />
</PreferenceScreen>