Commit Graph

27 Commits

Author SHA1 Message Date
Yiyi Shen
e5bd60a0cf [Audiosharing] Migrate feature from overlay to Settings
Bug: 340379827
Test: atest
Change-Id: I3a88ac1d2f575f3be1f26f617479bbfd25cf6a8e
2024-05-16 05:05:41 +00:00
Yiyi Shen
87629f2470 [Audiosharing] Support sharing dialog when click media devices.
Instead of directly stop audio sharing, clicking on media devices will
lead to different sharing dialogs based on different scenarios. The
scenarios are align to cases when a new device is connected.

Test: atest
Bug: 305620450
Fix: 327259953
Change-Id: Ibb591cb1a59f31c8f0be4f3e72e45378b17e3809
2024-03-22 14:11:11 +08:00
Yiyi Shen
a2577fd60e [Audiosharing] Impl audio sharing feature provider in Settings
Bug: 324023639
Test: manual
Change-Id: I4005ea8fbc0983a833f5a7dee2815f09eab48d3c
2024-02-20 08:06:55 +00:00
Yuanru Qian
0b91cdfbaa Switch some debug level logging to regular logging in the bluetooth settings for the ease of issue triage.
Change-Id: I9b73d24eb22613f6401c31352efc516f527b30d9
Bug: N/A
2024-01-10 06:23:58 +00:00
Yiyi Shen
22e3f51784 [Audiosharing] Update media devices section.
1. Filter out the media devices in audio sharing from the section.
2. During the audio sharing, click the media device will lead to
   stopping the sharing.

Flagged with enable_le_audio_sharing

Bug: 305620450
Test: atest AvailableMediaBluetoothDeviceUpdaterTest.java
Change-Id: I0676fd5aa98e593c6a5458845fc1b1631a5a6698
2023-12-06 18:25:09 +08:00
SongFerngWang
62cc96ac05 UI add more log
Bug: 260535339
Bug: 275754566
Test: build pass
Change-Id: I15c26d5b13f93e5a425c16174d6fbc2780c4e0a6
2023-03-31 17:33:12 +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
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
SongFerngWang
6426382e90 The UI only shows the active LE device
At the media device, it only shows the active LE device which is
connected.

Bug: 232892046
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdaterTest
make RunSettingsRoboTests ROBOTEST_FILTER=SavedBluetoothDeviceUpdaterTest

Change-Id: Iac661206def4d43bc40ab9bb1938f084926899c2
2022-06-20 21:30:34 +08:00
Alice Kuo
fa0aec49e3 Update the LE audio device into the media device category
Bug: 178981521
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AvailableMediaBluetoothDeviceUpdater
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=ConnectedBluetoothDeviceUpdater

Change-Id: I094ba6beb66fdebd7f3ef0a7c12bbed0e5b870e8
2021-10-26 12:12:46 +08:00
hughchen
47994dea19 Add log for debug
This CL use flag to decide which log should be show on.
This flag can be dynamic turn on when use below command:
adb shell setprop log.tag."your tag" VERBOSE

Bug: 155121301
Test: manually test
Change-Id: I0f3a28c11f6bd055efc84feb41d646b6c033f5b7
2020-05-05 11:26:28 +08:00
Jason Chiu
2d609759cd Add preference click metric logs for some special cases
Bug: 137559984
Test: visual, robotest
Change-Id: If8624b49abcd0000487065160ce4a7ba861f234c
2020-01-02 17:45:23 +08:00
Yanting Yang
118e7aee28 Turn off debug logging flags
Fixes: 130558346
Test: visual
Change-Id: Ie82bfe503f789435a3474697391fdfdeb94864ee
2019-04-17 19:55:54 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
TreeHugger Robot
e97c21b58d Merge "Update the method name from isA2dpDevice() to isConnectedA2dpDevice()" 2018-08-20 18:02:35 +00:00
timhypeng
f00a43a3e3 Update the method name from isHfpDevice() to isConnectedHfpDevice()
Bug: 110072747
Test: make -j50 RunSettingsRoboTests
Change-Id: I4f42a4d55a107c870c76761434f4e5999ac76904
2018-08-20 16:05:02 +08:00
timhypeng
156d52e14f Update the method name from isA2dpDevice() to isConnectedA2dpDevice()
Bug: 110072747
Test: make -j50 RunSettingsRoboTests
Change-Id: Id3ceb3a62b888a2bde82a1372edf26454e525ea1
2018-08-20 15:53:37 +08:00
timhypeng
47a6dbcd94 Remove test-purpose constructor from AvailableMediaBluetoothDeviceUpdater
- replace mock object with ShadowCachedBluetoothDeviceManager to test CachedBluetoothDevice
- rename cachedDevices to mCachedDevices

Bug: 111848213
Test: make -j50 RunSettingsRoboTests
Change-Id: I3028a6fe06c39c48e7cee33976bdfcab2c8b73c8
2018-08-16 01:24:52 +00:00
hughchen
70758584dc Check the device is connected when receive onProfileConnectionStateChanged()
Use isFilterMatched() to decide the prefernce should be added
or removed when receive onProfileConnectionStateChanged()

Bug: 80161203
Test: make -j42 RunSettingsRoboTests
Change-Id: Icccdb9007b587d3f481a23856edd7b2f7c9b04e0
2018-07-31 16:49:12 +08:00
hughchen
37dd4f1c71 Add log and turn on debug flag
Add log and turn on debug flag

Bug: 80161203
Test: make -j42 RunSettingsRoboTests
Change-Id: Ibd57f91b83c487ee71adb9e3de7ecfc5ea66bbef
2018-06-28 09:42:05 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
timhypeng
1c21bff103 To show hearing aids device in the available devices group
Bug: 79553082
Test: make -j50 RunSettingsRoboTests
Change-Id: I8fe5eb653d332ef5ac4a566146f150774581167c
2018-06-12 17:52:21 +08:00
timhypeng
1ae09fe2bf Click left side of list in "previously connected devices" should connect to the device
* For fix the TreeHugger error in pi-dev, cherry pick the ag/3943978 in
  master and fix TreeHugger error. Change android.support.v7.* to androidx.*
* In "previously connected devices", to connect device
* In "Available media devices", to activate device

Bug: 77607104
Test: make -j50 RunSettingsRoboTests
Change-Id: If5005031bd3f5dc4950abf2c77575785cd6f67b1
2018-05-14 11:26:43 +08:00
Ryan Lin
b5f9ba4e9b Merge "Use another callback to notify the updater that UI should be updated" into pi-dev am: dee5035764
am: 5d7faa9696

Change-Id: I7db97d62afbdb6deacc9f0b34393697acd44b0f2
2018-05-11 15:24:30 -07:00
ryanywlin
5365eaa6db Use another callback to notify the updater that UI should be updated
Replace onConnectionStateChanged callback
with onProfileConnectionStateChanged. While
updater is notified, isFilterMatched(cachedDevice)
will decide whether to add/remove from UI based
on audio profiles and audio mode.

Bug: 76447449
Test: make RunSettingsRoboTests -j28
Change-Id: Icfba1ce2297e4638679158f9f99bae276940d885
2018-05-11 05:44:43 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
hughchen
bd3e5de207 Implement audio switch UI
* Implement available media devices group
* Add AvailableMediaDeviceGroupController to realize UI, the user can see the all device that can be activated in this group.
* ConnectedDeviceGroupController change to show the device that cannot be activated but is connected.
* Refactoring the below class, implement the controller in connected_devices.xml.
  ConnectedDeviceGroupController.java
  SavedDeviceGroupController.java
  ConnectedDeviceDashboardFragment.java
  connected_devices.xml
* Add AvailableMediaBluetoothDeviceUpdaterTest to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged
* Add test that used to verify device is connected or not in BluetoothDeviceUpdaterTest.
* Add test that used to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged in ConnectedBluetoothDeviceUpdaterTest.
* Add AvailableMediaDeviceGroupControllerTest to verify bluetooth feature is supported or not and test register callback.
* Add test that used to verify bluetooth feature is supported or not and test register callback in ConnectedDeviceGroupControllerTest.
* Add test that used to verify bluetooth feature is supported or not and test register callback in SavedDeviceGroupControllerTest

Bug: 74134939
Test: make -j40 RunSettingsRoboTests
Change-Id: I54d03c2ddadc6a4be7519dd74cdbcb5055d44083
2018-04-15 04:22:25 +00:00