Commit Graph

35 Commits

Author SHA1 Message Date
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
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
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
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
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
jasonwshsu
35e20d5ace Fix not on the top when entering device detail page
Root Cause: Added SpacePreference in xml let the page renders order
incorrectly.

Solution: That SpacePreference should only be visible when the device is
hearing aid.

Bug: 245681095
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Merged-In: Ic0be940c8466b5e1e301255868c29d06bd4428bd
Merged-In: I442445a861898258a73f37ad8f85bcee387fbf58
Change-Id: Icca48d9c2643507638b2b581d052530521cce5df
2022-09-21 23:54:15 +08:00
jasonwshsu
cfec092373 Fix not on the top when entering device detail page
Root Cause: Added SpacePreference in xml let the page renders order
incorrectly.

Solution: That SpacePreference should only be visible when the device is
hearing aid.

Bug: 245681095
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Change-Id: Ic0be940c8466b5e1e301255868c29d06bd4428bd
2022-09-21 16:00:12 +08: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
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
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
SongFerng Wang
45436a025c Merge "Add the battery information into device details header" into tm-dev 2022-03-16 09:44:42 +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
fb1818969b Remove the extra line below context button
Bug: 223502042
Test: build pass
Change-Id: Ibb9e238b8069aa5dc9570fb9a4b3cb8f2a2523b1
2022-03-10 08:01:08 +00: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
Edgar Wang
27eec61289 Add divider below ActionButtonPreference in BluetoothDetailFragment
Bug: 187121773
Test: visual
Change-Id: I230967ae807431d92dcb82c16b12891a49b3ee0e
2021-05-05 22:30:59 +08: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
Sunny Shao
660b36e061 Use FooterPreference in xml explicitly
- Removed the FooterPreferenceMixin from the BluetoothDetailsMacAddressController.
 - Added the common api addFooterPreference.

Fixes: 139104386
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.bluetooth
Change-Id: Iab40fa4c5be674290b1dc6d372c84609ccc2ea49
2019-08-08 18:42:26 +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
jackqdyulei
22904a05b7 Add UiBlocker for DashboardFragment
If DashboardFragment detects blocker controllers, it won't display
until:
1. All blocking controllers finish bg works.
2. Timeout

This CL adds UiBlockerController to control this behavior and
BlockingSlicePreferenceController as an example.

Bug: 120803703
Test: atest SettingsUnitTests
Change-Id: I66fc194776d46ee49b3ec7685f3167834e673ba2
2019-01-10 14:25:43 -08:00
jackqdyulei
cf6374e427 Build infra to inject slice to PreferenceFragment
Reuse the PreferenceController and LayoutPreference however create
specific one for slice:
1. SlicePreference: container to inject slice view
2. SlicePreferenceController: handle updates for slice

Also add styles for it with default layout.

Bug: 120803703
Test: RunSettingsRoboTests

Change-Id: I6ab083ad57117e6198dcba37702a25213da78719
2018-12-18 14:38:25 -08:00
tmfang
8ad18fb3eb Use SettingsLib's ActionButtonsPreference
Since we moved old ActionButtonPreference into
SettingsLib, we need to update new imports and
declaration in Settings source code.

Test: robotest, manual test
Bug: 120005054
Change-Id: I1e3514ba68a856071c81534d54c99c3d1a11a8ca
2018-12-03 15:12:41 +00:00
tmfang
dce94bb237 Use SettingsLib's LayoutPreference
- Remove LayoutPreference in Settings source code.
- Remove unused style, layout
- Replace old imports to com.android.settingslib.widget.LayoutPreference
- Replace old XML tag to com.android.settingslib.widget.LayoutPreference

Test: robotest, manual test
Bug: 120005054
Change-Id: I9ae1ae14a16f443e11ac5d75b6038c7c5e253844
2018-11-27 13:12:53 +08:00
tmfang
3adb74ea60 Apply new action button visual design
- Add some icon resources.
- Add icon for each button in action button preference.
- Update "Enable" and "Disable" string to "Install" and "uninstall".
- Remove unused string.
- Add divider between entity header and action buttons.

Test: visual, robotest
Fixes: 119203074
Bug: 116346008
Change-Id: Ib8d7aeb2943d39d257e977b84f165f002bf47559
2018-11-16 14:33:03 +08:00
Doris Ling
03a3b518de Update preference screen title.
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
2017-10-25 11:02:07 -07:00
Fan Zhang
1105a1a465 Convert more pages to use ActionButtonPreference
- text to speech page
- blue tooth detail page
- installed app page

Change-Id: Ib743a144cc6025055cd496ec077f13fce4db0c69
Bug: 63991885
Test: robotests
2017-08-01 14:27:42 -07:00
Antony Sargent
1b6e7d76ed Fix Bluetooth device details crash on screen rotation
We were getting the following exception when you rotated the Bluetooth
device details screen:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.settings/com.android.settings.SubSettings}:
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR
and set android:windowActionBar to false in your theme to use a Toolbar
instead.

It turns out that allowing EntityHeaderController to inflate the
settings_entity_header.xml view seems to cause this - if you instead
manually include a LayoutPreference and hand that to
EntityHeaderController, you don't have the problem.

The rotation failure couldn't be tested with Robolectric because our
version doesn't support using FragmentTestUtil.startFragment for
fragments which use PreferenceScreen's ("sorry, not yet
implemented"). So instead this includes an app test.

Bug: 62447414
Test: runtest --path=BluetoothDeviceDetailsRotationTest.java
Change-Id: I8d052d1f4ab6e2b0ca5c0e513ec366bdcc382d99
2017-06-30 16:34:40 -07:00
Antony Sargent
04a3b2199e Add a new Bluetooth device details page
Bug: 35877479
Test: make RunSettingsRoboTests

The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.

Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.

Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10
2017-06-05 11:17:06 -07:00