Commit Graph

1451 Commits

Author SHA1 Message Date
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
c1fb0ae240 [Pair hearing devices] Add "Saved devices" to show bonded but not connected hearing devices
* BaseHearingDevicePreferenceController will also be used in "Hearing devices", so extract to parent class first.

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER="(SavedHearingDeviceUpdaterTest|BaseBluetoothDevicePreferenceControllerTest|BluetoothDeviceUpdaterTest|AvailableMediaBluetoothDeviceUpdaterTest|ConnectedBluetoothDeviceUpdaterTest|SavedBluetoothDeviceUpdaterTest)"
Change-Id: I8a492866f48e3a664b9ff78bce5a4f082c0dc465
2023-02-09 10:17:25 +08:00
jasonwshsu
48d56420ce [Audio routing] Setup basic structure for audio routing page
* Setup UI and bridge device address into audio routing fragment

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsAudioRoutingFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsAudioRoutingControllerTest
Change-Id: Ia7ffe34af54011a2e3cb445fc4fbd00f991835f3
2023-02-08 20:55:52 +08:00
Vania Januar
649c5198c8 Use BluetoothUtils.isAdvancedDetailsHeader in Header controllers.
Also removed isAdvancedDetailsHeader from Utils as it's an
exact duplicate of the function in BluetoothUtils.

Bug: 268165863
Test: AdvancedBluetoothDetailsHeaderControllerTest,
BluetoothDetailsHeaderControllerTest

Change-Id: Ia8caa7d0dce1760dcf14f2bdfcfebd81ad370f79
2023-02-07 11:34:16 +00:00
Xin Li
c660135971 Merge TQ1A.230205.002
Bug: 263898609
Merged-In: I13562d227e06627fac33239a9d21fd405a18d012
Change-Id: I1457d9362378bd893f557e1c998308cf8ee8904a
2023-02-06 21:05:31 -08:00
Betty Chang
ee7b709aff Merge "[LE Audio] To add the vibrate when the scan is successful" am: d7e16c22f6 am: c985a6d47d am: fb8a7a3b55
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2385039

Change-Id: I3126d4c3a15ce813abb28c2bf6ce38394f5aa570
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-13 21:59:35 +00:00
Betty Chang
c985a6d47d Merge "[LE Audio] To add the vibrate when the scan is successful" am: d7e16c22f6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2385039

Change-Id: I92615d5cc7a8605458d78082b45b339234ea52e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-13 11:58:35 +00:00
changbetty
ca475a5d37 [LE Audio] To add the vibrate when the scan is successful
Bug: 242023882
Test: manual test
Change-Id: Iabff5fb81e307222fb33541e4bf0008830321d3e
2023-01-13 02:30:23 +00:00
Andy Hung
11264e9a00 Merge "Bluetooth Settings: Restore Spatial Audio Settings" 2023-01-11 03:29:14 +00:00
Jason Hsu
e0301f7aa4 Merge "[hearing devices page] Launch 'Hearing decice controls' to Accessibility hearing device page." 2023-01-10 09:05:55 +00:00
Andy Hung
65680a2fd7 Bluetooth Settings: Restore Spatial Audio Settings
No need to gate under feature flag, it only shows if
Spatial Audio exists on device.

Test: Connect BT headset and see spatial audio settings
Bug: 264709855
Change-Id: Iddda3eb430b62880036bbe8c680addca07a60ab2
2023-01-06 16:21:29 -08:00
William Escande
377d52bfc1 Merge "Fix NPE in BluetoothPairingController when comparing BluetoothClass" am: 9aa06f28e8 am: ce2edfa3d4 am: 1da99510b1
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2373748

Change-Id: Ib68558e8896e5bd282eacd34f2bc2044bed5f54c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-05 07:37:29 +00:00
William Escande
1da99510b1 Merge "Fix NPE in BluetoothPairingController when comparing BluetoothClass" am: 9aa06f28e8 am: ce2edfa3d4
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2373748

Change-Id: I3346dba2aa9751bc77c17287dfe5d31759c05607
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-05 07:02:43 +00:00
William Escande
9aa06f28e8 Merge "Fix NPE in BluetoothPairingController when comparing BluetoothClass" 2023-01-05 05:59:38 +00:00
Treehugger Robot
47f6d387e7 Merge "Fix comment typo in BluetoothLengthDeviceNameFilter" am: 02888676a7 am: aa723a43dd am: 2fa3b95342
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2375748

Change-Id: I3df300aa4e8895ee4f3c0b8250e51b13920c1fa0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 12:27:50 +00:00
Treehugger Robot
2fa3b95342 Merge "Fix comment typo in BluetoothLengthDeviceNameFilter" am: 02888676a7 am: aa723a43dd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2375748

Change-Id: I7248e9b4f45a82ecaf55a451817dc5e056ba6c4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 11:53:04 +00:00
Shen Lin
85067c8136 Fix comment typo in BluetoothLengthDeviceNameFilter
Change-Id: I222d048e683bff4473849d26de50318b51a1eb9e
Test: manual
2023-01-04 08:46:12 +00:00
Shen Lin
bdcfaceeb2 Fix NPE in BluetoothPairingController when comparing BluetoothClass
Bug: 264162859
Test: atest BluetoothPairingControllerTest
Change-Id: I7e3c913855d77983f4f8bc61f5b08f64fe9fae4d
2023-01-03 06:33:51 +00:00
Betty Chang
a50fb6ec33 Merge "To check the bond state when get the connection state" 2023-01-03 02:20:03 +00:00
Vania Januar
b837d57b02 Set title for Bluetooth Details page to "Stylus" for styluses.
Bug: 254835745
Test: BluetoothDeviceDetailsFragmentTest
Change-Id: I725877b0bcf44fa7be805e16fb2d695c9d6074dc
2022-12-29 12:31:59 +00:00
Vania Januar
57822a67a8 Pass CachedBluetoothDevice into StylusDevicesController.
Styluses can now be identified using the newly added DEVICE_TYPE_STYLUS
metadata.

Bug: 251200056
Test: StylusDevicesControllerTest
Change-Id: Ie89f6419cd16ed97299944b35497c6b2ee764dab
2022-12-29 12:31:31 +00:00
jasonwshsu
9cb33c1315 [hearing devices page] Launch 'Hearing decice controls' to Accessibility hearing device page.
Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHearingDeviceControlsControllerTest
Change-Id: I14cdc8f91f1a6212ab98081eddd15e6a1eb5db50
2022-12-28 02:35:54 +08:00
changbetty
3caa8ad8f0 To check the bond state when get the connection state
Bug: 251973679
Test: manual test
Change-Id: I1e637bf5accbc5706f9d8a6f557a4fe038dae66b
2022-12-21 09:17:39 +00:00
jasonwshsu
a7d5801d28 [hearing devices page][Audio routing] Add feature flag to control visibility of the hearing device controls and audio output
* Setup basic xml for hearing device controls and audio output in bluetooth detail device page.
* Use same PreferenceCategory with spatial audio and rename to
  `feature_controls_group`

Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHearingDeviceControlsControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsAudioRoutingControllerTest
Change-Id: Ibe71757b53b9d65c6ab6efa1053d035e78882b68
2022-12-20 11:05:23 +00:00
changbetty
9d2b2ca5d8 Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
(cherry picked from commit c706aa6108)
Merged-In: I13562d227e06627fac33239a9d21fd405a18d012
2022-12-14 02:25:36 +00:00
TreeHugger Robot
beee3044d8 Merge "Implement new keyboard settings UI." 2022-12-13 05:28:07 +00:00
danielwbhuang
1639782df6 Implement new keyboard settings UI.
Add enabled input method locales page
Add keyboard layout picker page
Add keyboard settings entry in BT device detail

Bug: 242680718
Test: local test
Change-Id: I07e068ecde553d394697b25cb573f806229f6f52
2022-12-13 10:47:07 +08:00
William Escande
4c47fe5a66 Merge "Update log for BluetoothPairingService" am: cfb4ed4b7f am: cf36286d05 am: 0adc966d8c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2328877

Change-Id: I4a829cd044d5b8dd51ea119068b578f84309ed7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 20:26:53 +00:00
William Escande
0adc966d8c Merge "Update log for BluetoothPairingService" am: cfb4ed4b7f am: cf36286d05
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2328877

Change-Id: I48c191048a87cf6dd4e3433d412836c25aae5bac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 09:51:34 +00:00
William Escande
cf36286d05 Merge "Update log for BluetoothPairingService" am: cfb4ed4b7f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2328877

Change-Id: I1ce055ca532311ad813fdf5be80ee78e84c48d54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 09:13:43 +00:00
William Escande
cd231dc047 Update log for BluetoothPairingService
ACTION_PAIRING_CANCEL does not contain an EXTRA_BOND_STATE

Test: Log change is no-op
Bug: 253775131
Change-Id: Ida67374e9369991d7e016b38df9c17a8fa5418cc
2022-12-05 15:30:51 -08:00
Betty Chang
32591bfb96 Merge "[LE Audio] To remove the broadcast source item that created by receive state" 2022-12-05 03:42:06 +00:00
changbetty
a6d532cdba [LE Audio] To remove the broadcast source item that created by receive
state

    - When the user clicks another broadcast source and wants to join,
      we will remove the previous item that created by getAllSource().
      And trigger the search again.

Bug: 242267719
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothBroadcastSourcePreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothFindBroadcastsFragmentTest
Change-Id: I416f0a39e31276876e63360664555f99dd7297c9
2022-12-04 13:52:10 +00:00
Vania Januar
2df165a58a Add a stylus controller to Bluetooth Device Details.
Feature is currently flagged behing SETTINGS_SHOW_STYLUS_PREFERENCES.

Bug: 251201006
Test: SettingsRoboTests StylusDevicesControllerTest
DD: go/stylus-connected-devices-doc
Change-Id: I438b7fe5ca1c94f9dfb506c8918d0e6cb005ca33
2022-11-30 16:06:14 +00: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
Betty Chang
ba3405bd37 Merge "Make bluetooth switch not discoverable via SliceDeepLinkTrampoline" into tm-qpr-dev am: c8f6bba271 am: f200134fc4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20410007

Change-Id: If5d07a5a3ae099d1cb765a2fbb3069ab0ac00285
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 19:57:13 +00:00
Betty Chang
c8f6bba271 Merge "Make bluetooth switch not discoverable via SliceDeepLinkTrampoline" into tm-qpr-dev 2022-11-16 02:28:08 +00:00
changbetty
c706aa6108 Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
2022-11-08 08:50:29 +00:00
TreeHugger Robot
26b806629d Merge "Clean bluetooth code" into tm-qpr-dev am: 19278b9477 am: fec63bdb5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20377860

Change-Id: I6630576b731ff2c589b01520be45f55cf3f0e275
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 03:53:22 +00:00
Chaohui Wang
1b9f06c002 Merge "Fix some lint for Settings" 2022-11-04 05:28:46 +00:00
William Escande
07a8681f85 Merge "Fetch currently loaded bluetooth name" into tm-qpr-dev am: a364c8bacb am: dabdd6faa9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20378665

Change-Id: Ib66d0ba56cf9e4d12745673536208eb7cfef931a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 05:26:50 +00:00
William Escande
24278d1609 Clean bluetooth code
Fixing nit from Ib40a6264d8d6908103d76b6401ddcfd3ffa7dd88

Test: m ROBOTEST_FILTER="com.android.settings.bluetooth" RunSettingsRoboTests
Test: Open developer settings
Bug: 257158801
Change-Id: Id3521c423e5ab751633df627d113206f374fbe8e
2022-11-03 21:31:17 -07:00
William Escande
723df89aaa Fetch currently loaded bluetooth name
Test: m
ROBOTEST_FILTER="BluetoothMaxConnectedAudioDevicesPreferenceControllerTest"
RunSettingsRoboTests -j40

Test: m ROBOTEST_FILTER="com.android.settings.bluetooth" RunSettingsRoboTests
Test: Open developer settings
Bug: 257158801
Change-Id: Ib40a6264d8d6908103d76b6401ddcfd3ffa7dd88
2022-11-04 03:05:41 +00:00
Chaohui Wang
dbe73f6603 Fix some lint for Settings
Bug: 234570979
Test: Manually with Settings App
Change-Id: I4cd66be1df5499c070fd7f80caf9a5ab2873b93d
2022-11-04 11:01:41 +08:00
TreeHugger Robot
88313aed6c Merge "Fix the bluetooth extra control slice not visible" into tm-qpr-dev am: 3cb39ca221 am: 3ed6cb001b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20252603

Change-Id: Ic52873bd9940c0c8e60ab14bd617838c27d92916
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 09:27:59 +00:00
TreeHugger Robot
3cb39ca221 Merge "Fix the bluetooth extra control slice not visible" into tm-qpr-dev 2022-10-31 08:48:43 +00:00
SongFerngWang
8604adf90f [LE Unicast]UI can Enable/Disable VCP and CSIP am: 9144681d4c am: 217477e4d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20271144

Change-Id: Ia7c1ad3076736c56cedffcccd6e4a08db09e0912
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-26 14:13:55 +00:00
SongFerngWang
9144681d4c [LE Unicast]UI can Enable/Disable VCP and CSIP
When the user turns on/off the LE audio toggle, the settings set
enabled/disabled for the LE audio profile, the VCP profile and the
CSIP profile.

Bug: 238866767
Test: build pass. Local test: Enable/Disable LE audio toggle and
then those profiles work properly.

Change-Id: Iabfbea846a06104de977ef0e91c74e6e20334ec0
2022-10-26 12:39:15 +00:00
Alan Huang
4a7690919c Fix the bluetooth extra control slice not visible
The bluetooth extra control slice requires a parameter for the page width, but sometimes the onGlobalLayout callback is after the the fragment refresh the preference available state. Thus, setting the extra control slice to invisible, because the uri is not been set yet. So, add the displayPreference call to update the visibility of the slicePreference.

Bug: 251450477
Test: manual build and QA automation testing.
Change-Id: If7e5f426fc8b1d6887a5977600eaeaf3ede553d1
2022-10-21 03:25:35 +00:00