Commit Graph

1333 Commits

Author SHA1 Message Date
Angela Wang
345dd6ca46 Merge "Scan LE audio hearing aids in HearingDevicePairingDetail" into udc-qpr-dev am: b598284c68 am: 2ca0e6cb40
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726371

Change-Id: I8fba670669b04bf25fa1281c6daa1d3ec1ac9caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 04:03:16 +00:00
Angela Wang
b598284c68 Merge "Scan LE audio hearing aids in HearingDevicePairingDetail" into udc-qpr-dev 2023-07-21 02:38:24 +00:00
Angela Wang
940e02b807 Show connecting hearing devices in A11y hearing devices page
We only show connected hearing devices in the hearing devices page now.
When user pairing a device from pairing page and back to the hearing
devices page after the device is bonded, it's confusing no device shown
in the list because the device is still connecting to profiles. We
should show the connecting device to avoid confusion.

Bug: 283268686
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DeviceListPreferenceFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableHearingDeviceUpdaterTest
Change-Id: Id3b29c12b80c282736a3e6ca73bcf317e0652b89
2023-07-18 04:30:59 +00:00
Jean Chen
9a2e9c966b Merge "Set the shortcut size to large when user enabled Magnification" into main 2023-07-11 07:43:01 +00:00
Jean
137cc9af68 Set the shortcut size to large when user enabled Magnification
Set the settings shortcut size to large when the Magnification shortcut it enabled. Provide users with the large size as the default, which is easy to see.

Bug: 283844702
Test: manually - attach videos in the bug
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I8fac5780b8388b1b4f124cffbdd305235f035e72
2023-07-11 02:21:09 +00:00
Chun-Ku Lin
20976c3a53 use L10n-friendly runtime number formatting based on locale
Arabic use Western or Eastern numbers depends on the regions.

Bug: 276479321
Test: atest AccessibilityButtonFooterPreferenceControllerTest
Test: manual
Change-Id: I855f4fd891893b094163b0d479bdf3e5155dffc1
2023-06-29 02:48:32 +00:00
Angela Wang
1c7a59f125 Scan LE audio hearing aids in HearingDevicePairingDetail
Only ASHA hearing aids can be scanned from HearingDevicePairingDetail.
Add the ability to scan LE audio hearing aids (which supports HAP
profile) in hearing device page.

Since we're not sure what will hearing aids vendors organize the data in
the advertisement packet, add the filters as long as it's possible to
increase coverage when scanning hearing aid devices.

Bug: 286995224
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingDevicePairingDetailTest
Change-Id: I8faf85f38962653cf9bc988b02f3a4e5f2849b81
2023-06-28 09:38:02 +00:00
Candice Lo
958e154598 Merge changes I75d810e4,I50111f0c into udc-qpr-dev am: 290d241b1b am: 380deaaa3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23738691

Change-Id: Ia01815e7558b7f31eb05c7bd1fa12c7a7a930cee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 08:04:56 +00:00
Candice Lo
48999d3808 Doing null check before generating Extra Dim tooltip
Since the lifecycle of controller is independent of that of preference,
we do null check on the switch to avoid generating tooltip from the
switch when it is not ready. The fix is a temporary solution for the
issue and we would like to move the logic of tooltip to systemUI to
match the general view's lifecycle in the future.

Bug: 286810561
Test: manually - check the tooltip won't be shown and also won't cause exception after rotating the phone. (The switch view has not been created if it is out of screen.)
Test: manually - attach video to the bug
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest
Change-Id: I75d810e4b85baf06d57a3e31797a55daac791b79
2023-06-17 09:37:04 +00:00
Candice Lo
b66f6b67c8 Doing null check before generating Font Size tooltip
Since the lifecycle of controller is independent of that of preference,
we do null check on the seekbar to avoid generating tooltip from the
seekbar when it is not ready. The fix is a temporary solution for the
issue and we would like to move the logic of tooltip to systemUI to
match the general view's lifecycle in the future.

Bug: 279549685
Test: manually - check the tooltip won't be shown and also won't cause exception after rotating the phone. (The seekbar view has not been created if it is out of screen.)
Test: manually - attach video to the bug
Test: make RunSettingsRoboTests ROBOTEST_FILTER=PreviewSizeSeekBarControllerTest
Change-Id: I50111f0cc59cad4401ab67b06cd62e9067e8ed76
2023-06-17 09:36:40 +00:00
Chun-Ku Lin
802978fd80 Use FakeTimer in test to avoid flakiness.
**Root cause**
ScreenFlashNotificationColorDialogFragment creates Timer which spawns
unmanageable threads for tests. Also, the test itself uses Thread.sleep
which makes it non-destermistic.

Bug: 279082331
Test: atest ScreenFlashNotificationColorDialogFragmentTest --iteration
20

Change-Id: Id49c8d402a0578f8297ca12fe49da304c7a988d8
2023-06-15 18:20:23 +00:00
Angela Wang
6451a35d3e Merge "Shouldn't show pair another ear dialog if hearing aid supports CSIP" into udc-qpr-dev am: d91da4f4ca am: 4560d2f83b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23412076

Change-Id: I782742799c995339e9f00ba2265acd84fb2ee3a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 12:24:00 +00:00
Angela Wang
d91da4f4ca Merge "Shouldn't show pair another ear dialog if hearing aid supports CSIP" into udc-qpr-dev 2023-06-01 11:04:31 +00:00
Angela Wang
1bc59caf13 Shouldn't show pair another ear dialog if hearing aid supports CSIP
Some devices may supports both ASHA and CSIP. If the device supports
CSIP, it'll automatically pair the other ear and thus no need to pop up
the pair another ear dialog which is specially for ASHA device.

Bug: 283269736
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest
Change-Id: I9a8e3876e2905b18b1c63e74f47c6877504ebdc8
2023-06-01 09:54:35 +00:00
Angela Wang
412f5fad85 Merge "Make Hearing devices preference always visible" into udc-qpr-dev am: 7df08d69be am: 5176db8a71
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23429459

Change-Id: I6e5e91d3bbc44f3973fc021a94cde5d0accb5ce0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 03:36:35 +00:00
Chun-Ku Lin
79fdf3fce2 Move SettingsUnitTests to presubmit for accessibility related changes.
Bug: 279818352
Test: N/A
Change-Id: I4aea15b398cda07abcd1c5350b8059e4a5a4aee4
2023-05-25 22:02:35 +00:00
Angela Wang
abebbfc4b3 Make Hearing devices preference always visible
Previously we hide the preference when Bluetooth is off since it's only used for showing connected hearing aids and acting as a shortcut to device detail page.

However, the preference is now a new page of multiple controls, we probably shouldn't hide the preference the Bluetooth is off. Those controls should be accessible even if the Bluetooth is off.

Bug: 284092084
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidHelperTest
Change-Id: I647a187d73bd673c8ac8ab366579ba92c22ce1dc
2023-05-25 11:20:11 +00:00
Chun-Ku Lin
b8084ecfcd Unified service and shortcut state summary on a11y settings page.
Bug: 210026562
Test: manual
Test: atest

Change-Id: I4d5ff6b10d6bfd2fe6b3de1849d00a9d084bf269
2023-05-23 22:19:55 +00:00
Angela Wang
ce5f679db5 Merge "Add new bond entry to HearingAidInfoReported" into udc-dev am: 07563f6269 am: 5821b2c9cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23345338

Change-Id: I1ea7a84d3f22ac225db3cb3dbd812f95f072e1ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 04:14:00 +00:00
Angela Wang
2026cfc35e Merge "Add new bond entry to HearingAidInfoReported" into udc-dev am: 07563f6269 am: 8c5c2f1e1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23345338

Change-Id: I869c2bb351ecd4ef49c87cce79f22490458a4b5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 04:09:08 +00:00
Treehugger Robot
51eed93c10 Merge "Format the service name with BidiFormatter" 2023-05-22 17:51:11 +00:00
Chun-Ku Lin
a47404e14f Format the service name with BidiFormatter
The dialog's title was shown incorrectly in RTL language when the
accessibility service name is in English while the rest of the text is
in RTL language.

Bug: 279491415
Test: manual
Change-Id: I17572c161d34eb0e4d1fa0c4cca1c23531655a38
2023-05-20 00:38:59 +00:00
Angela Wang
a6f33abf53 Add new bond entry to HearingAidInfoReported
There's a new pairing page in "Settings > Accessibility > Hearing devices" which will initiate the bonding process. Add this page as a new bond entry to make logging more explicit.

Bug: 283203351
Test: m statsd_testdrive & statsd_testdrive 513
Change-Id: I562a435c60cb1046cd62459c40604a25aa308aef
2023-05-19 06:03:55 +00:00
Candice Lo
01965cf83a Merge changes I781cdba1,I13e94ce5,Icafa2109 into udc-qpr-dev am: ca7c7a2a50 am: d79430b971
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23241739

Change-Id: I3f5b918b26af2f09e357cb9d9fd5a1a5658ce800
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 09:56:57 +00:00
Candice Lo
ca7c7a2a50 Merge changes I781cdba1,I13e94ce5,Icafa2109 into udc-qpr-dev
* changes:
  Cleaning up tooltip for ToggleFeaturePreferenceFragment
  Cleaning up tooltip for AccessibilityQuickSettingsPrimarySwitchPreferenceController
  Cleaning up Font Size QS tile tooltip
2023-05-16 08:44:49 +00:00
Candice Lo
3dab6548b9 Cleaning up tooltip for ToggleFeaturePreferenceFragment
Cleaning up QS tile tooltip in the Settings page in onDestroy to avoid
leaking the window.

Bug: 279547549
Test: manually check only one tooltip exists
Change-Id: I781cdba1be7be0315de12cd57620521b40969aee
2023-05-16 06:27:44 +00:00
Candice Lo
cb92ae1096 Cleaning up tooltip for AccessibilityQuickSettingsPrimarySwitchPreferenceController
Cleaning up QS tile tooltip in the Settings page in onDestroy to avoid
leaking the window.

Bug: 279547549
Test: manually check only one tooltip exists
Change-Id: I13e94ce549e19fd54c9034f3b3372ecf40388e39
2023-05-16 03:43:20 +00:00
Candice Lo
dad011f5ba Cleaning up Font Size QS tile tooltip
Cleaning up Font Size QS tile tooltip in the Settings page in onDestroy
to avoid leaking the window.

Bug: 279547549
Bug: 279549685
Test: manually check only one tooltip exist
Change-Id: Icafa2109af316989330bda5ed831c2f746e7968b
2023-05-16 03:39:10 +00:00
Roy Chou
3b963fee25 Merge "chore(#AlwaysOnMagnification): hardcode the feature flag default true" into udc-dev am: 412c248c10 am: 32a2e30074
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23199816

Change-Id: Ifcb580e3e5379a4e33ce753425582e74ca535925
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 17:38:43 +00:00
Roy Chou
412c248c10 Merge "chore(#AlwaysOnMagnification): hardcode the feature flag default true" into udc-dev 2023-05-12 16:59:26 +00:00
Roy Chou
0aa67ede68 chore(#AlwaysOnMagnification): hardcode the feature flag default true
Set the feature flag getter default return value to be true to rollout to public. We keep the checking code so that it's still remote controllable.

Bug: 281788002
Test: manually test with adb command
Change-Id: Ie7f32721cf99d8a97c11f0f9c6d0d466c083d668
2023-05-12 15:57:56 +00:00
Jason Hsu
0522dc9b9d Merge "Correct shortcut summary to have different software types of shortcut result" into udc-dev am: 0c57f69f60 am: 4714fe7a4d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23157346

Change-Id: I4716ac5fc704aa4b6491e3df1a4f74128a97c339
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 15:10:56 +00:00
Jason Hsu
4ecbb9c13c Merge "Move 'Audio Output' to Accessibility hearing device page" into udc-dev am: 181cfa3aa5 am: 3f6e93beea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23157344

Change-Id: Ic1ce1c748c2ee749b4a73256a8d850df1232bb6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 15:06:05 +00:00
Jason Hsu
0c57f69f60 Merge "Correct shortcut summary to have different software types of shortcut result" into udc-dev 2023-05-12 14:20:54 +00:00
Jason Hsu
181cfa3aa5 Merge "Move 'Audio Output' to Accessibility hearing device page" into udc-dev 2023-05-12 14:20:23 +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
jasonwshsu
5656caecd0 Correct shortcut summary to have different software types of shortcut result
Root Cause: Did not consider different software types shortcut in AccessibilityShortcutPreferenceFragment

Solution: Add support for different software shortcut types

Bug: 263451053
Test: manual change shortcut type and check
Change-Id: Ic425fdab790d4bbf1de6418ada382e420a9860fc
2023-05-11 22:23:16 +08:00
Angela Wang
cd1a68db34 Merge "Disabled state UI of Flash Notifications preview button" into udc-dev am: 22d3116188 am: ae04daac19
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23081916

Change-Id: Ic2362f572bd3be5a857788e62d9e6afb97e06b0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 03:00:38 +00:00
Angela Wang
22d3116188 Merge "Disabled state UI of Flash Notifications preview button" into udc-dev 2023-05-11 01:41:47 +00:00
Angela Wang
53a8cc0326 Disabled state UI of Flash Notifications preview button
When both the camera flash and screen flash toggles are turned off, tapping on the preview button will have no effect and may confuse users. To avoid this, the appearance of the preview button should be updated to clearly indicated that its current state is disabled. This wil help users better understand the situation and prevent confusion.

Bug: 276494146
Test: checks the UI manually
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FlashNotificationsPreviewPreferenceTest
Change-Id: I55b11188fde6e551921a9b0f7c89daa20a8b766b
2023-05-09 16:48:35 +00:00
Angela Wang
d72f221a9b Merge "Hides Flash Notifications illustration on tablet" into udc-dev am: 1113d5e9b5 am: 75b08ce5ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23012482

Change-Id: I1c8e3f1fbc69031a6837ea565be008088d4493b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-08 09:11:21 +00:00
Angela Wang
1113d5e9b5 Merge "Hides Flash Notifications illustration on tablet" into udc-dev 2023-05-08 07:46:55 +00:00
Angela Wang
360cb671f2 Hides Flash Notifications illustration on tablet
Since tablet illustrations are not yet finalized, we'll hide the Flash
Notifications illustration on tablet for now.

Bug: 280748155
Test: checks the UI on phone and tablet manually
Change-Id: I5a309dec3291f3585cc1d9769e2465c94250fa7f
2023-05-05 09:54:04 +00:00
menghanli
87bc65c9e4 Fix the gradient drawable orientation is not mirrored for RTL alignment
Root cause: The orientation of the gradient drawable follows the view alignment. It should consider the text alignment.
Solution: Use getLayoutDirectionFromLocale# to get the text alignment to
set the correct orientation of the gradient drawable.

Bug: 278950655
Test: Manual test for RTL and LTR language
Change-Id: If94af75172ace137ac5168763f4cb47951f9e943
Merged-In: If94af75172ace137ac5168763f4cb47951f9e943
(cherry picked from commit 95fbb04106)
2023-04-26 01:37:42 +00:00
menghanli
95fbb04106 Fix the gradient drawable orientation is not mirrored for RTL alignment
Root cause: The orientation of the gradient drawable follows the view alignment. It should consider the text alignment.
Solution: Use getLayoutDirectionFromLocale# to get the text alignment to
set the correct orientation of the gradient drawable.


Bug: 278950655
Test: Manual test for RTL and LTR language
Change-Id: If94af75172ace137ac5168763f4cb47951f9e943
2023-04-25 05:43:29 +00:00
Angela Wang
dad8ac3b73 Logs Flash Notifications toggle event am: 8b1f85aaac am: 774769f420
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22562949

Change-Id: Id5c967024269f23c04724b9732f805609dec9b7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-24 07:30:04 +00:00
Angela Wang
8b1f85aaac Logs Flash Notifications toggle event
Logs the toggle event of different kind of flash notification to better know about how many usage of these feature and make it as our success metrics.

Bug: 277552681
Test: m statsd_testdrive && statsd_testdrive 513, checks the metrics manually
Change-Id: I73068744b7eef391ee459314da21c23cf64ef212
2023-04-24 06:12:23 +00:00
Daniel Norman
c14d26462b Adds TEST_MAPPING for Settings > Accessibility unit tests.
This initial TEST_MAPPING file is postsubmit only until we validate
which tests are stable enough to be moved to presubmit and which need
fixes.

Bug: 267225211
Test: atest --test-mapping packages/apps/Settings/src/com/android/settings/accessibility
Change-Id: I5e5f337d4ea7618ab92d3daa5171fd8ee1508c59
2023-04-20 22:04:11 +00:00
Jason Hsu
dd9803ccf7 Merge "Fix pair another dialog doesn't show up after pairing in all bluetooth device page." into udc-dev am: 80016ad92a am: d3453f681c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22477523

Change-Id: If2daf9293d431799df85b1a1fd299fd16cd1a790
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 09:25:41 +00:00
Jason Hsu
80016ad92a Merge "Fix pair another dialog doesn't show up after pairing in all bluetooth device page." into udc-dev 2023-04-18 08:47:37 +00:00