Commit Graph

51 Commits

Author SHA1 Message Date
Alice Kuo
aa734eb52a Use system properties for the le audio toggle ui config instead
Config LE audio UI per devices. Change to use system properties instead

Bug: 300807171
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Change-Id: Id0d624f516b9fdbe2380e5f10da5c69b08eea6a4
2023-09-18 03:05:59 +00:00
Yuyang Huang
b40e5c2228 Merge "Enable/Disable ASHA profile with LE audio toggle" into udc-qpr-dev 2023-08-03 22:20:35 +00:00
SongFerng Wang
b2c60799af Merge "Fix testcase failed" into udc-qpr-dev 2023-08-01 10:55:39 +00:00
SongFerngWang
7cbfe4a10e Fix testcase failed
Bug: 292979979
Test: [Pass]make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDeviceDetailsFragmentTest
Change-Id: If09f4d8ad9c974c2a7f72932d544490655b92cf7
2023-07-26 17:54:20 +08:00
Treehugger Robot
2fdc9c943b Merge "Show LE audio toggle in Device Detail by default" into udc-qpr-dev 2023-07-17 03:34:51 +00:00
SongFerng Wang
997ef1e5b3 Merge "Revert "Revert "Update the wording for LE Audio""" into udc-qpr-dev 2023-07-11 13:33:14 +00:00
SongFerng Wang
513f38cb17 Revert "Revert "Update the wording for LE Audio""
This reverts commit c123b2e5a8.

Reason for revert: Since the phase 2 launch plan was moved to next timeline at b/289884263.

Change-Id: I54ff20c0d9599da7f47e2254f721be6007a9204a
2023-07-11 08:20:23 +00:00
Patty Huang
698ce52a17 Show LE audio toggle in Device Detail by default
Bug: 289884263
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Test: Checks the LE Audio toggle is shown in Device Detail by default
Change-Id: I3affeebd9b2c59d24f4eaa76a1a22a714e968976
2023-07-10 11:05:35 +08:00
Treehugger Robot
5da1b03545 Merge "Do not show LE audio toggle in Device Detail by default" into udc-d1-dev am: 1f9f114495
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23898723

Change-Id: I2398f07f2f4936ab26a59a2df285ea3dae05bb94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 10:42:29 +00:00
Yuyang Huang
83e5cd004f Enable/Disable ASHA profile with LE audio toggle
LE audio has more capability and better quality than ASHA has. When LE audio turned on, ASHA should be off to avoid media streaming profile conflict.

Bug: 287525854
Test: manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f79e084bd0a3f9cd332d8218ac040d8c6c60f658)
Merged-In: I3c5c9012c167b920e484b39374fe8174191b094d
Change-Id: I3c5c9012c167b920e484b39374fe8174191b094d
2023-07-06 17:43:20 +00:00
Patty Huang
627a584f39 Do not show LE audio toggle in Device Detail by default
Bug: 289884263
Bug: 289957406

Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Test: Checks the LE Audio toggle is not shown in Device Detail by default
Change-Id: I2c6430c791dd852d238d7122a72f218f395c4a0b
2023-07-05 11:51:50 +08:00
SongFerng Wang
c123b2e5a8 Revert "Update the wording for LE Audio"
This reverts commit f4c5c8ef5e.

Reason for revert: at stage3, removing this summary.
Bug: 289184862
Change-Id: I6b18a7e2dee9d8fcfb331e53d7a57cc43574da54
2023-06-28 10:06:59 +00:00
SongFerngWang
7dc3cf0b32 When config is changed, update the profile's visibility
Bug: 286328464
Test: build pass
Change-Id: I2beef587a71f9fdc1b1e8a97b9b5656dbb52a9f3
2023-06-08 10:40:54 +00:00
SongFerngWang
ea85e3b2fa Add the log and moving it into onResume
Since user can open two settings app(one is via settings app button and other one is via quick settings) and user can switch them to foreground by the recent page. If user can goto the deviceDetails at Settings_A and then changes the config value at settings_B, then the user goes back Settings_A to check the UI. If config is in the init, the UI can't refresh the UI.
Bug: 285086232
Test: build pass.
Change-Id: I2284940eddcd02c543522b60f951c0d8d25775fd
2023-06-07 01:45:31 +00:00
Patty Huang
3e980c7c8f Default show LE audio toggle in Device Detail
Bug: 284790607
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Test: Checks the LE Audio toggle is shown in Device Detail by default
Change-Id: Id301815513e8066941d3e4c44ab2e7b4d5ed011b
2023-06-01 20:36:34 +08:00
David Duarte
2920cad66f Merge "Revert "Revert "Remove CSIP/VCP enable/disable from Setting""" into udc-dev 2023-05-18 21:58:59 +00:00
SongFerngWang
ef7a75c394 To refresh/register/unregister all of the devices with same groupId
Since the LE audio have two or more devices in the same group and
the UI show their status at one preference, the UI need to register
callback for each of the devices, and also refresh the deviceList.

Bug: 278155752
Test: local test to pairing the device and check the battery part
Change-Id: I2fcde92a1f68b8437465b234820f7bad13dfc444
2023-05-18 16:28:52 +08:00
Rahul Sabnis
7840717139 LEA developer option is enabled if the BT LEA flag is enabled
Bug: 281568856
Test: Manual
Change-Id: If59afff53c304e38074d7a9999329dc039d4cffb
2023-05-15 17:53:26 -07:00
SongFerngWang
f4c5c8ef5e Update the wording for LE Audio
Add the summary for LE Audio toggle
Bug: 280000165
Test: build pass

Change-Id: Ic1eee71d6ff70d01e9a37ab0ec06cfaf639fe963
2023-05-11 12:30:59 +08:00
Alice Kuo
560abbcc49 Revert "Revert "Remove CSIP/VCP enable/disable from Setting""
This reverts commit 6edb515a9f.

Reason for revert: we need this change and need to merge together with prebuilt

Bug: 280626194
Change-Id: Id883c6c7c778154038c249f7be8e9fabf52299c3
2023-05-09 08:01:50 +00:00
Treehugger Robot
83cc6a64c6 Merge "Revert "Remove CSIP/VCP enable/disable from Setting"" into udc-dev 2023-05-09 05:33:40 +00:00
Jack He
6edb515a9f Revert "Remove CSIP/VCP enable/disable from Setting"
This reverts commit 345889b5e2.

Reason for revert: Accidental merge, should merge together with prebuilt

Bug: 280626194
Change-Id: I93f66f22b55eb906f8e079de35f2db00b102c788
2023-05-09 02:44:45 +00:00
Jack He
d55e645795 Merge "Remove CSIP/VCP enable/disable from Setting" into udc-dev 2023-05-09 02:43:13 +00:00
Alice Kuo
345889b5e2 Remove CSIP/VCP enable/disable from Setting
We moved this part to Bluetooth Framework, so remove these from Setting

Bug: 280626194
Test: NA
Change-Id: Ia84d0d68d8d77fde7479b6d4e49743dfeb821eae
2023-05-06 05:31:34 +08:00
SongFerngWang
706257c57a Hide the LE audio toggle by flag
Bug: 280021500
Test: build pass.
Change-Id: I3f4a821c50dfb9d2de73919945334b42c59b3309
2023-05-04 03:43:28 +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
Treehugger Robot
1937737393 Merge "Refresh "Device details" after resuming" 2023-03-28 12:42:53 +00:00
Rahul Sabnis
b1e25950b8 Clean up Settings to allow a2dp, hfp, and le audio to be simultaneously
connected on the same device

Removes the classic audio toggles for dual mode audio devices.

Bug: 257881495
Test: Manual
Change-Id: Ie6794b4d904c74a7c5137ad141172c10188a99f9
2023-03-23 16:51:49 -07: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
pingzhi wang
11081cae50 Refresh "Device details" after resuming
"HD Audio: LDAC" is still on when relaunch "Device details" from recent
apps after turning it off

Call refresh() after resuming.

Bug: 242351058
Test: 1.Long click "Bluetooth" form QS.
  2.Pair and connect with IOT supporting LDAC.
  3.Click the settings icon to the right of the connected device.
  4.Turn on "HD audio: LDAC".
  5.Click home key, make it in recent apps.
  6.Settings-> Connected devices -> Media devices -> settings icon.
  7.Turn off "HD audio: LDAC".
  8.Try to relaunch the first "Device details" screen (step 5) from recent apps.

Change-Id: I4a0c475211669f61e718f47a713a982ac58e914a
2022-08-15 12:23:08 +02:00
SongFerngWang
0167a4d8a6 [LE unicast] Disable the "phone calls" when LE is enabled
The "phone calls" uses the Headset profile, not HFP profile. The ui
uses the wrong profile. It causes the "phone calls" is always enabled
when LE is enabled.

Bug: 231511825
Test: build pass
Change-Id: Ib507352107c0d825b8c7a9605713bc9083259fbd
Merged-In: Ib507352107c0d825b8c7a9605713bc9083259fbd
2022-05-23 17:34:48 +08:00
SongFerngWang
5350643e7a [LE unicast] Disable the "phone calls" when LE is enabled
The "phone calls" uses the Headset profile, not HFP profile. The ui
uses the wrong profile. It causes the "phone calls" is always enabled
when LE is enabled.

Bug: 231511825
Test: build pass
Change-Id: Ib507352107c0d825b8c7a9605713bc9083259fbd
2022-05-19 15:14:01 +08:00
Ben Murdoch
cab2b2c4d0 Fix NPE in Bluetooth Settings.
Bug: 230347816
Test: Manual
Change-Id: I210ce81217466897c59509a31fb53d57eed71118
2022-04-25 18:40:54 +00:00
Hugh Chen
76e230918f Check null BT profile to prevent crash
Bug: 229802811
Test: build pass
Change-Id: Idf9f32ec08793784fbce05d34c53cdf53cddb312
2022-04-20 04:53:23 +00:00
SongFerngWang
b50430e09d [LE unicast] Change the default value for LeContactSharingEnabled
Bug: 229322144
Test: build pass.
Change-Id: I7673397b9f04df8acb551bdad42dea1f3ece72ff
2022-04-15 15:19:17 +08:00
SongFerngWang
11b337178a Hide the Contact sharing toggle for LE audio mode
1. Add the device config key
2. Hide the Contact sharing toggle for LE audio mode
Bug: 228415214
Test: manual test and take the screenshots at bug.

Change-Id: I07674d0edbcd642814ed61ccd13cb4e1e42caec3
2022-04-13 22:11:49 +08:00
SongFerngWang
e7c89d616a [LE]Gray out the a2dp and hfp when LeAudio is enabled
1.Gray out the a2dp and hfp when le audio is enabled
2.When the user disables le audio, then the settings turn on the
  a2dp and hfp
3.When the user enables le audio, then the settings turn off the
  a2dp and hfp

Bug: 218626162
Test: build pass.
Change-Id: Ic728749112b0047cac291600b3279b9dedbf0b5a
Merged-In: Ic728749112b0047cac291600b3279b9dedbf0b5a
2022-03-16 17:51:22 +08:00
Hugh Chen
848ce26373 Fix talkback will speak "disabled" when select empty preference
Set empty preference as not selectable to make talkback
not to detect it.

Bug: 178068585
Bug: 178067426
Test: manually test
Change-Id: Id293a61494cd0bdd79d104918502101cb5caf050
2021-02-25 15:17:06 +08:00
hughchen
1df322225b Add bottom padding of profile group on Bluetooth detail page
- This CL add a bottom padding preference to make UI consistency.
- Update test case

Bug: 146522686
Test: make -j42 RunSettingsRoboTests
Change-Id: I525d8a3b71535972755de92924a3c04768f68e63
2020-05-18 13:17:15 +08:00
hughchen
eba97c8ce6 Update profile api
The profile will auto connect / disconnect when set enable / disable
profile. This CL remove connect / disconnect method.

Bug: 141582844
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib875d126be0d8483fb539e7ba950242a4f38cf81
2020-02-05 16:04:36 +08:00
jackqdyulei
715408e592 Add intent action for BT device detail page
Also update detail page to accept cold start:
1. Check whether profile is ready
2. When it is ready, refresh UI

Bug: 123665527
Test: SettingsRoboTests
Change-Id: I39382fd97e9da46fca08cd2e4a3ef15d32703664
2019-02-11 13:48:16 -08:00
jackqdyulei
1fc7629dda Add layout for advanced BT detail header
If device supports metadata, then we display advanced UI in Bluetooth
details header. This CL adds layout for this header.

In advanced layout, it will show:
1. Device name
2. Left, right and case icon
3. Left, right and case battery level

Once API is ready, following CL will get metadata from it and set it
to UI.
Bug: 122460277
Test: RunSettingsRoboTests
Change-Id: Ide044cf9705f350b431b2cb3a9ad82cc4425a17e
2019-01-28 14:12:49 +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
hughchen
ab1bc299d8 Use BluetoothDevice.ACCESS_* instead of CachedBluetoothDevice.ACCESS_*
1. Use BluetoothDevice.ACCESS_* instead of CachedBluetoothDevice.ACCESS_*
2. Use BluetoothDevice.setPhonebookAccessPermission() directly.
3. Use BluetoothDevice.setMessageAccessPermission() directly.
4. Use BluetoothDevice.getPhonebookAccessPermission() directly.
5. Use BluetoothDevice.getMessageAccessPermission() directly.
6. Use BluetoothDevice.getSimAccessPermission() directly.

Bug: 112517004
Test: make -j42 RunSettingsRoboTests
Change-Id: Ibe6b207b891b9bd2b328a2e2c7264a9a78cb498f
2018-08-23 11:27:49 +08:00
Hemant Gupta
6fdf8c225d Merge "Bluetooth: PBAP not disconnected on disabling contact sharing" am: 84bb2293ae am: ff985c6bc7
am: 0c75671a5f

Change-Id: Icc7d90a0e440d3d8f462d61821c602b26f79dbb7
2018-08-17 13:41:13 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Hemant Gupta
453534d210 Bluetooth: PBAP not disconnected on disabling contact sharing
Precondition: Contact Sharing is checked and there is PBAP Connection.

Usecase:
1) Establish PBAP Connection.
2) Disable "Contact Sharing" button.
3) Check if PBAP is Disconnected or not.

Issue:
PBAP Profile Disconnection is not triggered.

Root Cause:
Change in Setting menu UI by removal of "Disable Profile"
dialog box (like Android O) has resulted in not invoking
PBAP Disconnect call from Setting App.

Fix:
Handle Disconnection for PBAP from API disableProfile() at
settings/bluetooth/BluetoothDetailsProfilesController.java
like other profiles.

Test: Issue is not seen as per above usecase.

Bug: 110515410
Change-Id: Ibd18fb836e10e79e99e6b04127ae181134201cef
2018-06-22 08:21:47 +05:30
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00