Commit Graph

74 Commits

Author SHA1 Message Date
Haijie Hong
7cd4a3987f Add device details more settings page
BUG: 343317785
Test: atest DeviceDetailsFragmentFormatterTest
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: Ia9eff049e73e039ac5d0fb26096ab4e9add60315
2024-08-19 23:41:16 +08:00
Haijie Hong
41f7c222b6 Rearrange bluetooth device details fragment according to config
BUG: 343317785
Test: atest DeviceDetailsFragmentFormatterTest
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: I440f85b2c402920e851915ff56fa7b3f5356e807
2024-08-14 16:06:15 +08:00
Haijie Hong
c2ed6d3242 Move rename button next to the device name
BUG: 343317785
Test: atest GeneralBluetoothDetailsHeaderControllerTest
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: I87f030ca48d3edac13759fe51499b7e400dbb795
2024-08-12 12:31:45 +08:00
Haijie Hong
a074f27499 Add device to to cached device manager if it's not present
Bug: 346923808
Test: atest BluetoothDeviceDetailsFragmentTest
Flag: EXEMPT minor bug fix
Change-Id: Ia4987bc7ec93cb6b54d188922b7232d83d528f2f
2024-06-25 10:42:38 +00:00
Haijie Hong
99a7e76561 Refresh ANC UI if metadata is changed
Test: I didn't find any existed unit test for ANC, I manually tested in phone.
Bug: 341000840
Change-Id: If09abae5835225f3d9190a05d8308dbaa9e9b63d
2024-05-24 09:50:54 +00:00
Haijie Hong
1ab367d3a0 Exit bluetooth device details page when bluetooth is off
Bug: 333836213
Test: atest BluetoothDeviceDetailsFragmentTest
Change-Id: I4632c10a8f6f828885825e1ee46df6537a0c050c
2024-04-15 13:29:42 +08:00
Angela Wang
82e4ed3bd1 Selects presets in device details page (1/2)
Enables users to select their presets in Bluetooth device details page if the device supports HAP.

This CL only contains the UI elements. The full functionality will be introduce in the next CL.

Bug: 300015207
Test: atest BluetoothDetailsHearingDeviceControllerTest
Test: atest BluetoothDetailsHearingAidsPresetsControllerTest
Change-Id: I1ab4781191b0c9e1033a29c30ca61671878bb7e1
2024-02-29 09:17:32 +00:00
Angela Wang
4af270b231 Separate category controller out of HearingDeviceControlsController
We're going to add more different device controls (such as hearing aids presets, volume offset controls or microphone volume controls) into "device_controls_general" PreferenceCategory. It's better to keep the category controller separated from the child controller to better maintain the visibility of the whole category and have a clearer stucture of these controllers.

Bug: 300015207
Test: atest BluetoothDetailsHearingDeviceControllerTest
Test: atest BluetoothDetailsHearingDeviceSettingsControllerTest
Test: atest BluetoothDeviceDetailsFragmentTest
Change-Id: I7f35b02a1120aefa8307e500f7abfce3b8055fbf
2024-02-29 09:17:30 +00:00
Jason Hsu
2eba5be9b4 Merge "Fix corss-link hearing device settings" into main 2024-02-03 09:57:04 +00:00
jasonwshsu
917682603c Fix corss-link hearing device settings
Root Cause: There are two device details entries in Connected devices and Hearing devices page which can both go to the same page, it will have the endless loop problem.

Solution: Only show hearing device settings comes from Connected devices page.

Bug: 320709814
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDeviceDetailsFragmentTest
Change-Id: I26941d0d16ab3bb0df0cb2c481c25c6c41340261
2024-01-28 01:01:41 +08:00
Haijie Hong
76d8145f15 Add BT extra options in device details page
Bug: 319562236
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsExtraOptionsControllerTest
Change-Id: Ifab39d2bd19044d60f090f4a0419d1e20b2ad925
2024-01-17 19:02:20 +08:00
Haijie Hong
c2694e1ff6 Fix scrolling to wrong position issue in Bluetooth Device Details page
Bug: 294355795
Test: tested locally
Change-Id: Ic80fb7974cf30adb3112aeb826c2b5bcb0067afc
2023-09-27 08:34:37 +00:00
Guojing Yuan
756d23cad1 [CDM] Add Permissions Sync toggle
Bug: 290063372

Test: manually tested the toggle
Change-Id: I75d4370eed98275e2f99d65620229bdb57193fb8
2023-09-12 18:02:38 +00:00
Chaohui Wang
cc2133ba8e Clean up unused fields from EntityHeaderController
Bug: 295260929
Test: manual - on pages with header
Test: robo test
Change-Id: Icebd63dbb5d3d44b4b46d3bececb8b65b30b4883
2023-08-21 13:58:07 +08:00
Vlad Popa
d32044a8c1 Merge "Add list preference for BT audio device type selection" into main 2023-08-11 00:21:56 +00:00
Vlad Popa
a145082250 Add list preference for BT audio device type selection
Since BT devices do not populate the device type reliably we offer the
user the possibility to categorize the audio type of the selected
device. This is can be used by the AudioManager for enabling/disabling
the computation of sound dose.

Test: atest BluetoothDetailsAudioDeviceTypeControllerTest
Bug: 287011781

Change-Id: I797a92e1af4025596ef1c603ed4ab59813e3cbf0
2023-08-10 15:20:52 -07:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
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
SongFerngWang
c054498357 Replace the SlicePreference with Preference am: 794fc58235
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22755956

Change-Id: I5e9032624347b27acb02eafd28002744d92b5f2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 06:23:25 +00:00
SongFerngWang
794fc58235 Replace the SlicePreference with Preference
The Settings' 2 panel did not support SlicePreference, since it
always open activity with NEW_TASK and it casues the settings can't
set new page at right side.

Bug: 270544054
Test: build pass. local test: the phone pair the buds with fastpair, and
then check the slice preferences.
atest BlockingPrefWithSliceControllerTest (pass)

Change-Id: I0e8abfd284492f04ab322a5bed13741fc6b25b34
2023-04-21 23:08:06 +08:00
TreeHugger Robot
f145881a7d Merge "Open the settings page for a specific physical keyboard" into udc-dev 2023-03-29 05:31:49 +00:00
danielwbhuang
cc749159df Open the settings page for a specific physical keyboard
1. Check open from a notification
2. Check open from Bluetooth entry
3. If the inputDeviceIdentifier is not null, open the next page
   directly.
4. Add extra to record the class of sender for the future metrics.

Demo: http://screencast/cast/NDU4MTYxOTIzMTg4MzI2NHxiYTQ0ODE5Ny02YQ

Bug: 269212353
Test: manual, atest
[Pass] atest KeyboardSettingsPreferenceControllerTest
[Pass] atest PhysicalKeyboardPreferenceControllerTest

Change-Id: Ie874003260896bbb949806623913e70486e4731d
2023-03-28 14:15:08 +00:00
jasonwshsu
fd76efc7fd Update the strings for bluetooth hearing device details page in U
Bug: 270086620
Test: flash rom and check the device details page UI for hearing device
Change-Id: Iae1a7fae9f51ed8318d757ed7b3eefe0261b28a1
2023-03-21 15:10:38 +08: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
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
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
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
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
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
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
jasonwshsu
7880aee855 Add pair button in bluetooth details page for hearing aid device
Root Cause: Users can not connect another ear again after they cancel
the pairing dialog in Accessibility -> hearing aids entry

Solution: Add pair button in bluetooth details page for hearing aid
device

Bug: 233038449
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest

Change-Id: I6a7af1c2c2263476b040233edb072cc64a2927b0
2022-08-10 07:20:56 +00:00
jasonwshsu
b07754d178 Add pair button in bluetooth details page for hearing aid device
Root Cause: Users can not connect another ear again after they cancel
the pairing dialog in Accessibility -> hearing aids entry

Solution: Add pair button in bluetooth details page for hearing aid
device

Bug: 233038449
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest

Change-Id: I6a7af1c2c2263476b040233edb072cc64a2927b0
2022-08-09 18:06:27 +08:00
TreeHugger Robot
1b5fd5904d Merge "[VolumePanel] Fix the Hearable control slice uri parameter" into tm-dev am: fc45c25296 am: 3b2fe3e89e am: 7fb0500aa8 am: f20d28e0c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18638446

Change-Id: I251634e96e47dee560b9031f2122893ec8042a72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 21:36:13 +00:00
Alan Huang
b9be27b006 [VolumePanel] Fix the Hearable control slice uri parameter
The provided uri doesn't contain the formatted string, so just append
the width at the end

Bug: 229048602
Test: make -j64 RunSettingsRoboTests
Change-Id: Idadbb4d725c8ca65bac31fbead8ac1d429ebcea9
2022-06-09 08:22:33 +00:00
jasonwshsu
00019e721f Add mechanism to add accessibility service or activity into bluetooth 'Related' category am: 02b373522a am: 99e5fe760a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17472403

Change-Id: I2674a27be6bade64b028fdd2f1cc9118ed544c85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-15 07:48:50 +00:00
jasonwshsu
02b373522a Add mechanism to add accessibility service or activity into bluetooth 'Related' category
Bug: 225117933
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsRelatedToolsControllerTest
Change-Id: Iaa3593b4fd9d916fe7f96b3e4bb0965fdbbe36ec
2022-05-14 22:43:19 +08:00
Jason Hsu
32fd161d70 Merge changes from topic "hearingAidsInT" into tm-dev am: c3bbb709b9 am: 76155f90db
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17321711

Change-Id: I11fe74d8690cfd79c2deed72385b197834cf167a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 01:14:08 +00:00
Jason Hsu
c3bbb709b9 Merge changes from topic "hearingAidsInT" into tm-dev
* changes:
  Add 'Live Caption' preference for hearing aids device in Device details page
  Update summary in Accessibility -> Hearing aids
  Header for hearing aids now listed in one summary
2022-05-14 00:24:44 +00:00
jasonwshsu
384200a337 Add 'Live Caption' preference for hearing aids device in Device details page
Bug: 225117933
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsRelatedToolsControllerTest
Change-Id: Ic607fa7d10aa2049ab0852a86a57dd1d5d1ac7df
2022-05-14 03:36:01 +08:00
TreeHugger Robot
1d616fcda3 Merge "Add Hearable control slice in bluetooth device detail settings" into tm-dev am: 8a823a2c2c am: 7f3fe5f386
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18350203

Change-Id: I8e320da7c241b3c6f7def874f8d463771762656e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 15:53:30 +00:00
Alan Huang
8595cf779a Add Hearable control slice in bluetooth device detail settings
Bug: 229048602
Test: make -j64 RunSettingsRoboTests
Change-Id: I850aaee9bf7518c9f9de065fbbd1eb4919fc62ee
2022-05-13 03:41:32 +00:00
Hugh Chen
bf81ecd75f When in guest mode hide the rename button
Bug: 198173108
Test: local test
Change-Id: I29eb227104baa43ab8223f86a6a5d9cecd612bde
2022-04-14 11:21:07 +00:00
SongFerngWang
57dd3bc444 Add the battery information into device details header
Add the new LE audio header
Add the battery information
Update the condition for non-LE audio header

Bug: 218626547
Test: build pass and manualy test
Change-Id: Ib9f4c388c369dc374c43dd399111e02b5555159b
2022-03-16 12:17:15 +08:00
Hugh Chen
7b5f8ad883 RESTRICT AUTOMERGE Implement Spatial Audio and Head Tracking option in bluetooth settings
Implemented the Spatial Audio and Head Tracking options, make these
features could be controlled in bluetooth detail settings.

Bug: 218960300
Test: make -j64 RunSettingsRoboTests
Change-Id: I880cc7a10fc5e2fa5d1052fff5a7b589a4ff60df
(cherry picked from commit bc2f30ca67)
2022-03-09 11:02:34 +00:00
Eugene Susla
7dc2624b51 Companion Device App showing in Settings
Added a feature that users are able to see/remove the apps' associations
in Settings/Connected devices.
It will display the icon of the associations app, app's name and a button
that users are able to remove the associations. Also it will pop up a
dialog alerting user before remove the associations.

Screenshot:
https://screenshot.googleplex.com/APSRhW2retYmAAK

Bug: 165951651
Test: Manually Test

Change-Id: Iccaeaf516e8a78d4ef33415c1c2d7379139ec88c
2021-04-24 21:31:25 +00:00
hughchen
d89518e3c5 Finish bluetooth detail fragment if device is BOND_NONE
This CL is used to check the bluetooth bond state when
fragment is onResume. The bluetooth detail fragment will
finish if the bluetooth bond state is BOND_NONE when
fragment is onResume.

Bug: 146621601
Test: make -j42 RunSettingsRoboTests
Change-Id: I157e1da925dcf527ce2b49ad431079d90b7c4fc3
2019-12-26 11:32:58 +08:00
hughchen
d368c21832 Fix runtime exception when cachedDevice is null
Finish the activity after call super.onAttach().

Bug: 143187915
Test: make -j42 RunSettingsRoboTests
Change-Id: I8f205ef60797bd9eb96617d413f554613008f65b
2019-10-24 14:36:37 +08:00
Lei Yu
15899e8b0e Add SettingsPolicy to control BT feature
Fixes: 130302238
Test: RunSettingsRoboTests
Change-Id: I7e1bf55c476f8e4d3dec7a7dfc0e8d44e5bd53ae
2019-04-18 11:31:05 -07:00