Commit Graph

15 Commits

Author SHA1 Message Date
jasonwshsu
212470d0a6 Move 'Audio Output' to Accessibility hearing device page
* Extract the common part into HearingAidHelper.
* Remove abstract getHearingDevice(). Change to get the hearing device when needed.
* Move several classes from Bluetooth into Accessibility

Bug: 281783079
Test: make RunSettingsRoboTests ROBOTEST_FILTER="(HearingDeviceAudioRoutingBasePreferenceControllerTest|AccessibilityHearingAidPreferenceControllerTest|HearingAidHelperTest|HearingAidAudioRoutingPreferenceControllerTest|HearingDeviceCallRoutingPreferenceControllerTest)"
Change-Id: I79049107409b7086c6dcc8d48a6323e171ed1535
2023-05-12 13:46:53 +08:00
jasonwshsu
23417c3aca [Pair hearing devices] Add "Hearing devices" to show connected hearing devices
Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableHearingDeviceUpdaterTest
Change-Id: I15bff230cac29fdbad13d452878bc57b57d9773e
2023-02-09 10:17:25 +08:00
jasonwshsu
1cc2ccc499 [hearing devices page] Add feature flag to control visibility of the hearing devices page
* Setup basic xml for hearing devices page

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidsFragmentTest
Change-Id: I3cc794e124d1dfda46f8d5fba658de47f84b63f5
2022-12-16 18:29:56 +08:00
Angela Wang
416b5bd63f Unifies constants accross hearing aid related profiles (2/2)
Hearing aid constants defined differently across different hearing aid
related profiles. For hearing aid device mode, HearingAidProfile and
HapClientProfile have different values for mode definition and there is also
a new BANDED hearing aid type in HapClientProfile spec. For hearing aid
device side, HearingAidProfile has only 2 kinds of side which is left
and right whereas BLE hearing aid can retrieve 27 different kinds of
audio location.

We therefore introduce a new class HearingAidInfo for mapping these
different constants across these profiles into a single unified set of
constants.

Bug: 253192350
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Change-Id: Id14928dbc051fcf76fe0d66b43aefefb1b5f7baf
2022-11-28 09:03:37 +00:00
Angela Wang
e7a4b1f13d Shows LE audio hearing aid device in a11y settings page (3/3)
Shows connected hearing aid in a11y settings page whether it's ASHA hearing aid or LE audio hearing aid. Makes sure preference summary is updated as expected when BluetoothHapClient profile connects or disconnects.

LE audio hearing aid will be a CSIP set. According to the CSIP spec, we will show the device is active without side information if there is only one device in the CSIP set and show the device is active left and right if both side of hearing aids are in the CSIP set.

Bug: 249235823
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdaterTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsRelatedToolsControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdaterTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicesSliceTest
Change-Id: Ifd66cbd81481a1eb94613d89dfd8df16b8c43ae8
2022-11-23 07:50:51 +00:00
jasonwshsu
6e7a8422ac Fix 'Hearing aids' of Accessibility page didn't display connected info promptly when mobile restart
Root Cause: get empty result in hearingAidProfile.getConnectedDevices()

Solution: Need to listen to onServiceConnected() to wait for HearingAidService get connected

Bug: 243489972
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Change-Id: If6c3b2f3df81388c44e744e364e6258bde8bb645
2022-09-06 15:08:34 +08:00
jasonwshsu
acd3f94fde Pop up pairing another ear dialog when detecting hearing aid is a set
* Pop up dialog in 'Connected deivce' page and 'Accessibility -> Hearing
  aids' page

Bug: 225117454
Bug: 226511985
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtils

Change-Id: I34a1e3ac680a7efe97dc501bfbe93f840ad16364
2022-05-14 22:16:22 +00:00
jasonwshsu
82d3bb2b73 Update summary in Accessibility -> Hearing aids
Bug: 225117843
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Change-Id: I19c08474349e9ae98cd3f296ba8423f920d55fcf
2022-05-14 02:06:45 +08:00
Mill Chen
6f3b222ca5 Clean up in-code preference controllers from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I0c1358657d3f57ddae2b8f2b12ee610e7363f41f
2019-07-09 17:35:32 +08:00
tim peng
18979c5313 [Issue fix] Hearing aids subtitle status is not updated.
- Replace LifecycleObserver library with androidx.lifecycle

Bug: 128470997
Test: make -j50 RunSettingsRoboTests
Change-Id: I6d59d8b888dcb374c346a94a1ad38956317576bf
2019-03-21 01:24:10 +00:00
timhypeng
23233700e5 Fix only one "active" HA showing under Accessibility Settings
-return main device on getConnectedHearingAidDevice()
-add test case

Bug: 123777253
Test: make -j42 RunSettingsRoboTests
Change-Id: I63522311b2248df983f200864b5465c0055056da
2019-02-14 01:31:03 +00:00
Weilun Du
def4fd900d Fixed Settings crash caused by null bluetooth adpater.
Emulator doesn't support bluetooth.

BUG: 123026204
Change-Id: I5fddfaff03dfd882688a73542278d8ef1e509ca2
Signed-off-by: Weilun Du <wdu@google.com>
2019-01-22 00:12:20 +00:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Chienyuan
fca684aab6 Replace LocalBluetoothAdapter with BluetoothAdapter
LocalBluetoothAdapter is obsolete, use BluetoothAdapter instead.

Bug: 111810977
Test: make -j50 RunSettingsRoboTests
Change-Id: I5109a0296c1006a3c2e346bf966ef8901c101e30
2018-08-09 11:40:54 +08:00
timhypeng
53a12ee7b8 Add Hearing Aid UI into Settings-Accessibility App
- dynamically show/hide preference by HearingAid profile is supported or not
- add AccessibilityHearingAidPreferenceController to handle hearingAid preference
- add HearingAidDialogFragment to handle dialog behavior

Bug: 109948484
Test: make -j50 RunSettingsRoboTests

Change-Id: Ic55dde475dc40311f7e652f4a86d342597f09f0e
2018-07-30 16:48:39 +08:00