Commit Graph

45 Commits

Author SHA1 Message Date
Jakub Rotkiewicz
c923103142 Bluetooth Codec Settings: Assure flag enabled
Assure flag a2dpOffloadCodecExtensibilitySettings is enabled before
calling BluetoothA2dp API.

Bug: 331612641
Tag: #feature
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.AbstractBluetoothListPreferenceController
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.BluetoothCodecListPreferenceControllerTest
Merged-In: Iac33a6c95a544230e034807b320c80a727ade307
Change-Id: I2b0ed6c7ac91401b958b206817aca55e0aa47170
2024-04-16 06:08:46 +00:00
Jakub Rotkiewicz
de27acef86 Refactor Bluetooth Codec settings to dynamic ListPreference
Fetch supported codecs from native and present to user using
ListPreference.

Bug: 305779598
Bug: 311451118
Bug: 323319530
Tag: #feature
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.AbstractBluetoothListPreferenceController
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.BluetoothCodecListPreferenceControllerTest

Merged-In: Iedbfd01c0d1b59df8a073f4e9aedca3913e6d45f
Change-Id: I90ed0d83c3250c64789e27707b0b7bff30043335
2024-03-21 11:06:18 +00:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Omer Osman
dc7fdfa060 Update Opus over A2DP to use BluetoothCodecConfig api
Bug: 240635097
Test: sink device using bds-dev
Change-Id: Idd0a0c8a63dc969acbb10a88df5218507017e475
2022-08-25 04:10:18 +00:00
Omer Osman
b61e129f35 Add support for selection of Opus in Developer Options
Stub implementation for LC3 is added due to the interfaces being
present. The BT stack does not currently implement LC3 over A2DP.

Bug: 226441860
Test: BluetoothCodecDialogPreferenceControllerTest

Change-Id: I40546c97370872b37c0258d10e67a3871f9d9af5
2022-07-29 05:23:55 +00:00
Etienne Ruffieux
9692c59d3a Replacing getActiveDevice by btAdapter.getActiveDevices()
BluetoothProfile.getActiveDevice() is hidden, packages
should call BluetoothAdapter.getActiveDevices(profile)
instead.

Tag: #feature
Bug: 200202780
Test: build
Change-Id: Id18658de82a7e8292942951a3832a36465a69da3
2022-02-02 15:29:34 +00:00
Etienne Ruffieux
e004eaa51b Make BluetoothCodecConfig and BluetoothCodecStatus public
Tag: #feature
Bug: 200202780
Test: make RunSettingsRoboTests
Change-Id: I2a81216de050b143cee5c537d899a699d5012330
2021-11-10 10:12:51 +00:00
Tim Peng
07b3675717 Phone fails to switch channel mode from stereo to mono
-Set codec to SBC when HD audio is off

Bug: 194349060
Test: make -j50 RunSettingsRoboTests

Change-Id: Iae4aa3f1d77350f5b4d91e7a687e048091c1daea
2021-10-29 03:28:14 +00:00
Tim Peng
93ee8efe94 BTHS will have no sound after disable HD audio
-setCodecConfigPreference() should not be called when disableOptionalCodecs() is called.
-disableOptionalCodecs() would set SBC codec automatically

Bug: 183456866
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothCodecDialogPreferenceControllerTest
Change-Id: Ib18f4a683dcba7ba92df827c30da0088c90b4d72
2021-04-01 21:38:00 +08:00
Tim Peng
8467b9f484 [Bug] Private DNS shows odd message about Bluetooth
-Private DNS dialog uses preference_widget_dialog_summary
layout. It is wrong to set Bluetooth string for it.
-Remove default string from preference_widget_dialog_summary
-Set the customized string in BaseBluetoothDialogPreference

Bug: 179329046
Test: manual test
Change-Id: I749647f48e4bba7d4d0f9099d1c40d788778c15e
2021-02-24 14:21:38 +08:00
timhypeng
ce4dfc5c04 Set highest priority as default value to Bluetooth codec
-To set highest priority when codec modification comes from development setting

Bug: 165442632
Test: make -j42 RunSettingsRoboTests
Change-Id: I8cfbaa276f3b3e269f4a80e8aae987fbb90f646e
2020-09-01 15:28:59 +08:00
Tim Peng
5a9e58372a “Bluetooth Audio Codec” is not getting listed while searching for it using “keywords” from settings search tab
-Implement PreferenceControllerMixin to decide nonIndexableKeys list according to isAvailable() status

Bug: 156337281
Test: make -j50 RunSettingsRoboTests
Change-Id: I8787acfd50ac351499781d016a3c806a1a6b4f9f
2020-06-04 14:25:31 +08:00
Rahul Sabnis
3e0f661f11 Revert "Revert "Pass in active device to all BluetoothA2dp APIs ..."
Revert submission 10303287-revert-10253996-bt-a2dp-no-null-FQRXACWPIA

Reason for revert: Fixing breakage
Reverted Changes:
I4d9f2f819:Revert "Make sure calls to BluetoothA2dp APIs pass...
I771ca0d57:Revert "Need to now pass in active device instead ...
I76529c7a1:Revert "Pass in active device to all BluetoothA2dp...
I297bda68d:Revert "Require user pass in a non-null BluetoothD...
I525327959:Revert "Pass in active device to all BluetoothA2dp...
I1d8660b11:Revert "Pass in active device to all BluetoothA2dp...

Bug: 147287141
Test: robotests
Merged-In: I5aecfa4b5a8e371b914573ddd080acb98078bfca
Change-Id: I5aecfa4b5a8e371b914573ddd080acb98078bfca
2020-03-03 16:21:49 -08:00
Daniel Chapin
2be6fc2afe Revert "Pass in active device to all BluetoothA2dp APIs in packa..."
Revert submission 10253996-bt-a2dp-no-null

Reason for revert: b/149361880
Reverted Changes:
If43934374: Pass in active device to all BluetoothA2dp APIs in...
I22dd1ca36: Make sure calls to BluetoothA2dp APIs pass non-nul...
If6475af6f: Require user pass in a non-null BluetoothDevice to...
I9d0e2c89c: Pass in active device to all BluetoothA2dp APIs in...
I1faa6174d: Need to now pass in active device instead of null ...
I69a941a7e: Pass in active device to all BluetoothA2dp APIs in...

Change-Id: I1d8660b11c917cf657e61478d58794182e17ec1a
2020-02-12 17:16:10 +00:00
Rahul Sabnis
dcedd7d6f5 Pass in active device to all BluetoothA2dp APIs in
packages/apps/Settings as null input is no longer supported

Bug: 147287141
Test: Manual
Change-Id: If43934374914c657080ffd0509f8095d988cc550
2020-02-10 11:16:49 -08:00
timhypeng
9a8ec96e48 Unable to set Bluetooth configuration at the first time
- initial configuration value
- add test case

Bug: 147634692
Test: make -j50 RunSettingsRoboTests
Change-Id: If55036d358d664bcbcb816a38f18019c62976d38
2020-01-16 14:37:28 +08:00
tim peng
8e25a3a658 Merge "Apply new preference and controller for Bluetooth developer option" 2019-12-16 01:24:53 +00:00
tim peng
f455e1719e Merge "Add sample rate preference controller for Bluetooth developer option" 2019-12-13 07:09:08 +00:00
timhypeng
548e927ed9 Apply new preference and controller for Bluetooth developer option
- Modify XML to apply new preferences and controllers
- Remove old controller file
- Move codec optional codec to the uppler layer

Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: Ia8fca4bc5b228592fdacad206e010bf0219282d4
2019-12-11 14:27:31 +08:00
timhypeng
6ba89c33a4 Add sample rate preference controller for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I84198ae04221c2f28c1d8e596e4a8f295e7a76d1
2019-12-11 13:18:06 +08:00
tim peng
1e00dbf41c Merge "Add bit per sample preference controller for Bluetooth developer option" 2019-12-11 02:18:18 +00:00
tim peng
59d56cee0b Merge "Add quality preference controller for Bluetooth developer option" 2019-12-11 02:18:05 +00:00
tim peng
d8bb8b3383 Merge "Add channel mode preference controller for Bluetooth developer option" 2019-12-11 02:17:49 +00:00
tim peng
ea1106494d Merge "Add codec dialog preference controller for Bluetooth developer option" 2019-12-10 02:49:17 +00:00
TreeHugger Robot
821db5c036 Merge "Add sample rate preference for Bluetooth developer option" 2019-12-10 01:42:16 +00:00
timhypeng
6a1b765d74 Add quality preference controller for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I42b6ecdc0b661f9057db23405785351980f04056
2019-12-09 15:27:10 +08:00
TreeHugger Robot
41eff9f631 Merge "Add quality preference for Bluetooth developer option" 2019-12-09 06:06:37 +00:00
timhypeng
bd80f7f949 Add channel mode preference controller for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: Ibf2238ee8b5d3a9d91ea40fea16aa44583a22cc0
2019-12-09 13:38:49 +08:00
TreeHugger Robot
efa2229556 Merge "Add channel mode preference for Bluetooth developer option" 2019-12-09 05:37:21 +00:00
timhypeng
8b5790dcc0 Add bit per sample preference controller for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I8cde0d80d3533368dce6d101d49036fc97627526
2019-12-09 13:17:25 +08:00
timhypeng
8e2aa11e3a Add codec dialog preference controller for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I5cff61f9f90d9e6a125455685a3608be043f6e7c
2019-12-09 13:14:58 +08:00
tim peng
e655695690 Merge "Add bit per sample preference for Bluetooth developer option" 2019-12-09 05:12:12 +00:00
timhypeng
588a1ca250 Add sample rate preference for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I5cae9498082d1839add63d2bc01e29639a0c20ee
2019-12-09 13:10:28 +08:00
timhypeng
dc05caec4d Add quality preference for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I025557ec0977a1585cf65bfacc4a01020c9ea19a
2019-12-09 12:55:45 +08:00
timhypeng
4db1f25f3b Add channel mode preference for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: Iace94d24d8d395366c8fb78863d2fe09ecd0f60d
2019-12-09 12:31:30 +08:00
timhypeng
19f0230520 Add bit per sample preference for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: Idaf9be96f4e48acf46cbf53ae7f7d100db002c7c
2019-12-09 11:27:10 +08:00
tim peng
d100099ecc Merge "Add codec dialog preference for Bluetooth developer option" 2019-12-09 03:21:47 +00:00
timhypeng
2e5dabf88b Add codec dialog preference for Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I27966cedf915b66e6ce1e4ece2fd854dc21a2841
2019-12-06 15:37:14 +08:00
timhypeng
bea3a6e6c8 Add new HD audio preference controller for Bluetooth developer option
- move HD audio switch from codec to upper layer

Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: Ic9a3aa9666d2e105c762fec818c9a47383a6ecd2
2019-12-04 13:04:12 +08:00
tim peng
cef4313ea0 Merge "Add base dialog preference controller for new Bluetooth developer option" 2019-12-03 07:12:17 +00:00
tim peng
1082bca0ee Merge "Add base preference controller for new Bluetooth developer option" 2019-12-03 07:12:17 +00:00
timhypeng
78b0edfe3c Add base dialog preference controller for new Bluetooth developer option
Bug: 142227996
Test: manual
Change-Id: I15335d9c783b5ddba1b93322449f345f450d587f
2019-12-03 09:35:53 +08:00
timhypeng
54d06d368d Add base preference controller for new Bluetooth developer option
Bug: 142227996
Test: make -j50 RunSettingsRoboTests
Change-Id: I9d10019228bc575f4ac38494e4dd27d672d5da6d
2019-12-02 14:45:42 +08:00
timhypeng
fdd98bd9ff Add base preference for new Bluetooth developer option
Bug: 142227996
Test: manual
Change-Id: I23c11072a326473bdc7ce169c6c2fb970a8f828d
2019-11-28 17:09:36 +08:00