Commit Graph

18154 Commits

Author SHA1 Message Date
Yiyi Shen
4ac216914e Merge "[Audiosharing] Update dialog btn when start sharing with no extra connected device" into main 2024-08-09 02:37:20 +00:00
Joshua Mccloskey
1a888b6e8f Merge "Added haptic feedback in fingerprint settings auth" into main 2024-08-09 00:43:42 +00:00
Riley Jones
386dda7028 Merge "Adjust edit shortcuts page to display button & gesture" into main 2024-08-08 17:24:46 +00:00
Treehugger Robot
93b093033a Merge "Migrate Tips Card in battery uasge to Settings Card." into main 2024-08-08 15:09:30 +00:00
mxyyiyi
427c9c3187 Migrate Tips Card in battery uasge to Settings Card.
before:
[Dark-settings]:https://screenshot.googleplex.com/56EiS3PbtRsh5RR
[Light-app]:https://screenshot.googleplex.com/8UDuFEkkrLUt53D

after:
[Dark-settings]:https://screenshot.googleplex.com/3zKxxGi2Awa6s72
[Light-settings]:https://screenshot.googleplex.com/rsgVh9P62x7itUa
[Dark-app]:https://screenshot.googleplex.com/56EiS3PbtRsh5RR
[Light-app]:https://screenshot.googleplex.com/6bfs2u43nZpHL8y

Bug: 357603119
Test: atest BatteryTipsControllerTest
Flag: EXEMPT bug fix
Change-Id: I25e3b407378b01ef9868326a005554ceb6e94181
2024-08-08 13:59:11 +00:00
Alexander Roederer
3d0dcda008 Remove the ZenModeSliceBuilder
We don't want the old Do Not Disturb page to show up in the search index
results, so we can remove the custom Slice Builder.

Note that this is part of the general Do Not Disturb/Modes Settings Changes: see b/353700470

Bug: 341726633
Test: atest SettingsSliceProviderTest, flash+test
Flag: android.app.modes_ui
Change-Id: Ibba372d5fa6caf3ee28d9fd2a900047060b212da
2024-08-08 00:54:14 +00:00
Riley Jones
1e80db4ee3 Adjust edit shortcuts page to display button & gesture
Page is altered to display the FAB shortcut
and gesture shortcut simultaneously when the user is in
gesture navigation mode.
The gesture option does not display the "more options" link.
Additionally, the gesture option controller uses the GESTURE type,
which means it will read from & write to the gesture setting.
All this behavior is flag protected.

Bug: 300318311
Test: atest FloatingButtonShortcutOptionControllerTest GestureShortcutOptionControllerTest
Flag: android.provider.a11y_standalone_gesture_enabled
Change-Id: I915f05b2102ce499bb906df2c13e0870ae0a36d5
2024-08-08 00:14:09 +00:00
Yuri Lin
74be225a4e Merge "Fixes to interstitial activity transitions" into main 2024-08-07 21:05:38 +00:00
Yuri Lin
707014b3f9 Fixes to interstitial activity transitions
Return after finish() when mode data is invalid; start intent before finish() so the transition is animated like going forward.

Bug: 332730534
Test: manual
Flag: android.app.modes_ui
Change-Id: I26522fdf468da7f2fdb8f75ac405d5f808f8828f
2024-08-07 16:04:28 -04:00
Matías Hernández
494dc4c282 Merge "Filter out disabled modes from the "can activate automatically" count" into main 2024-08-07 18:51:27 +00:00
Treehugger Robot
1a8c84dfb3 Merge "Fixed remote validation shows SetupRedaction" into main 2024-08-07 17:54:27 +00:00
Joshua McCloskey
7f26cdbb4a Added haptic feedback in fingerprint settings auth
Test: Verified manually that the haptic vibration occurs
Fixes: b/296887919
Flag: EXEMPT bugfix
Change-Id: I34c71701b662ec7f6fb655eeb395bbe1d5d5754b
2024-08-07 17:52:45 +00:00
Matías Hernández
d70fbf8e91 Filter out disabled modes from the "can activate automatically" count
Bug: 355615361
Test: atest ZenModeSummaryHelperTest
Flag: android.app.modes_ui
Change-Id: Id54f08bfc253e69db0efb4e330813e89c28058d9
2024-08-07 19:08:50 +02:00
Joshua McCloskey
1c40c534ba Fixed remote validation shows SetupRedaction
Test: atest ConfirmLockPasswordTest ConfirmLockPatternTest
Fixes:353187344
Flag: EXEMPT bugfix
Change-Id: I03dff2bf27f7134f5372b85901f2866727f9d534
2024-08-07 16:28:45 +00:00
Matías Hernández
31d5fbff3c Merge "Update Priority Modes segment summary" into main 2024-08-07 10:07:58 +00:00
Yiyi Shen
da812758f3 [Audiosharing] Update dialog btn when start sharing with no extra connected device
There are two btns now: Pair new device and Show QR code
Pair new device -> go to Pair new device page
Show QR code -> go to QR code page

Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 305620450

Change-Id: Id5ddb66f1bbc3b02228a0d639bf30cdc40bef265
2024-08-07 17:58:37 +08:00
Angela Wang
e92627e26d Merge "Rename CachedBluetoothDevice.getConnectableProfiles()" into main 2024-08-07 09:52:32 +00:00
Yiyi Shen
81539522d4 Merge "[Audiosharing] Handle device volume when volume bar is changed without touch" into main 2024-08-07 08:56:45 +00:00
Yiyi Shen
adbdc16113 [Audiosharing] Handle device volume when volume bar is changed without touch
Fix volume control when user use talk back swipe up/down or use Switch
Access to change the volume bar progress

Fix: 357028436
Fix: 357028435
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: Iab7d48ab8713a3a809cc8f7b28381a2b86b9be5f
2024-08-07 15:17:18 +08:00
Angela Wang
73fd3c1e3f Merge "Update UI for Flash notifications" into main 2024-08-07 07:11:40 +00:00
Chelsea Hao
5473fa04f5 Merge "[Audiosharing] When landscape mode, collapse app bar to make more space. Also refined fragments and make them scrollable." into main 2024-08-07 05:07:00 +00:00
Yuri Lin
eb6dd8432b Merge changes from topic "yl-interstitial" into main
* changes:
  Resize & round corners on a placeholder interstitial image
  Add interstitial for modes that are disabled but not by user
2024-08-06 19:38:45 +00:00
Matías Hernández
f0952bef52 Update Priority Modes segment summary
* Display active modes regardless of DND status
* Only consider actually automatic rules for the "x rules can activate automatically" text.
* Also removed the duplicate settings observer in favor of ZenSettingsObserver.

Bug: 355615361
Test: atest ZenModesSummaryHelperTest
Flag: android.app.modes_ui
Change-Id: I39acb785e7b27c95ed664261640c42032acca9d1
2024-08-06 19:48:01 +02:00
Ming-Shin Lu
55102216e1 Merge "Delete keyboard_category_enabled flag (2/2)" into main 2024-08-06 11:38:41 +00:00
Angela Wang
3146a9a08a Merge "Fix LE Audio toggle missing issue for dual mode hearing device" into main 2024-08-06 09:31:28 +00:00
Nikhil Kumar
bf420bbe7c Merge "Restrict admin status change when DISALLOW_GRANT_ADMIN is present" into main 2024-08-06 09:21:11 +00:00
chelseahao
e7a1762ef3 [Audiosharing] When landscape mode, collapse app bar to make more space. Also refined fragments and make them scrollable.
Bug: b/356302527, b/356300387, b/356297148
Flag: com.android.settingslib.flags.enable_le_audio_qr_code_private_broadcast_sharing
Test: atest
Change-Id: I5d94f0d05afc78c13cab5b75ad662af72ffa0350
2024-08-06 09:09:11 +00:00
Daniel Norman
2a8c60ff6f Merge "Never restricts Accessibility Activities based on ECM/admin." into main 2024-08-05 22:59:40 +00:00
Treehugger Robot
6b6b9c10ff Merge "Restrict MobileDataSlice" into main 2024-08-05 21:25:59 +00:00
Weng Su
75a070f3f0 Restrict MobileDataSlice
- Hide MobileDataSlice if the user is not allowed to configure mobile networks.

Bug: 310630794
Flag: EXEMPT bugfix
Test: manual test
atest -c MobileDataSliceTest

Change-Id: I35814733a915f011e284b082ce7a94898ce8a6fb
2024-08-06 04:14:12 +08:00
Nikhil Kumar
01b7062b34 Restrict admin status change when DISALLOW_GRANT_ADMIN is present
This change addresses a security gap where users with the "DISALLOW_GRANT_ADMIN" restriction could still grant admin privileges to others, potentially undermining supervised user models.  We've extended the existing logic to ensure that restricted users cannot grant or receive admin privileges when the DISALLOW_GRANT_ADMIN restriction is in place. This prevents scenarios where supervised users could create new admins to bypass restrictions and factory reset the device.

In addition to the core functionality improvement, significant code refactoring has been done to untangle complex multiple if conditions. The logic for determining when admin status changes are allowed is now clearer and more readable, taking into account both the "current user" (initiating the change) and the "target user" (whose privileges are being modified).

Bug: 357056776
Test: atest UserDetailsSettingsTest and manually verified the user having DISALLOW_GRANT_ADMIN restriction is not allowed to change admin status of any other user.
Flag: android.multiuser.unicorn_mode_refactoring_for_hsum_read_only
Change-Id: If02c9355ee7ce285b5b7bcddae630d716d5bf333
2024-08-05 18:16:33 +00:00
Ming-Shin Lu
bc79a1e074 Delete keyboard_category_enabled flag (2/2)
As keyboard_category_enabled feature has launched, remove the feature
flag since it's unnessary.

And, this CL is the preparation of removing CATEGORY_KEYBOARD vibration
attribute and logic, remove the flag usage ing settings since no longer
need this flag.

Flag: EXEMPT flag removal
Bug: 332661766
Test: build
Test: atest KeyboardVibrationTogglePreferenceControllerTest
Change-Id: I19cecb977d52a74b26eea1f494052e0e852359c4
2024-08-05 14:06:24 +00:00
Angela Wang
711d0b269c Rename CachedBluetoothDevice.getConnectableProfiles()
The original method name implied that the returned profiles were guaranteed to be connectable. However, it actually filters profiles based on user can access the profile in the UI and initiate the connection. Change the method name to getUiAccessibleProfiles() aligns the name with the actual behavior.

Flag: EXEMPT simple renaming
Bug: 356530795
Test: m
Change-Id: Ib7d29a4bf9c213ddcecc567864583165ab97a099
2024-08-05 07:14:15 +00:00
Angela Wang
4ad8e0c568 Update UI for Flash notifications
1. Hide the preview button when it's disabled
2. Change the text from “Done” to “Save” in the color selector dialog

Flag: EXEMPT simple UI change
Bug: 356978471
Test: manually, video attached on the bug
Test: atest FlashNotificationsPreviewPreferenceControllerTest
Change-Id: I2e6e697ad10f0207602d613085663cdd82521ea2
2024-08-05 06:46:50 +00:00
Yiyi Shen
b068edadf1 Merge "[Audiosharing] Returns BluetoothDevice when fetchConnectedDevicesByGroupId" into main 2024-08-05 06:11:47 +00:00
Matías Hernández
0721f5c5b2 Replace direct usage of update origin by TestModeBuilder.setEnabled() overload
Bug: 333527800
Test: atest ZenModesListItemPreferenceTest
Flag: android.app.modes_ui
Change-Id: Ice6144b8a15641703495d18b57f5b56cda91e92a
2024-08-02 19:01:04 +02:00
Matías Hernández
7a1039fea4 Merge "Overhaul the message senders screen" into main 2024-08-02 12:43:31 +00:00
Matías Hernández
a4c99767b7 Overhaul the message senders screen
* Fix combinations of messages=all with other conversation values.
* Correctly display policies with CONVERSATION_SENDERS_ANYONE. An additional checkbox is included, but _only_ if the policy has CONVERSATION_SENDERS_ANYONE when shown.
* Changed updateState() to consider the possible cases one by one. Because multiple policies are mapped to the same checkbox states, the strategy of "checking whether the state matches what the checkbox wants to set" doesn't really work.
* Fix messages summary and circles to support CONVERSATION_SENDERS_ANYONE.
* Added a lot of tests (actually, hopefully ALL OF THEM) covering the user-visible behavior. :)

Fixes: 354658240
Test: atest ZenModesSummaryHelperTest ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I727496ca3eb820e4baaab942b61d2e57cdb491fc
2024-08-02 12:36:44 +02:00
Angela Wang
a8297a313b Fix LE Audio toggle missing issue for dual mode hearing device
After the code change of ag/28283226, they hide the LE Audio toggle for
LE Audio only device since turning off the profile may cause this device
no functioning. But the dual mode hearing devices(LE Audio + Asha) are
wrongly recognized as LE Audio only devices since
HearingAidProfile.accessProfileEnabled() return false. This make the
users lost the ability to switch between profiles they preferred.

Make HearingAidProfile.accessProfileEnabled() return true and hide the
Hearing Aid toggle by default since it's also meaningless to turn off
the Asha profile for Asha-only devices.

Flag: com.android.settingslib.flags.asha_profile_access_profile_enabled_true
Bug: 356530795
Test: manual checking the UI
Test: atest BluetoothDetailsProfilesControllerTest
Change-Id: Ica350b4c16c1b07945399bfee1038f7b0824baed
2024-08-02 07:11:25 +00:00
Yiyi Shen
7edad1c84a [Audiosharing] Returns BluetoothDevice when fetchConnectedDevicesByGroupId
CachedBluetoothDevice can change its member variable mDevice, so we can
not rely on the CachedBluetoothDevice#getDevice when we add source to
it. This change will return BluetoothDevice instead of
CachedBluetoothDevice when fetchConnectedDevicesByGroupId, so that we
won't add source to unintended BluetoothDevice via
CachedBluetoothDevice#getDevice.

Fix: 350877510
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I4ee41b8f1449e7176f0a05a7dd4e59034c161824
2024-08-02 05:20:31 +00:00
Treehugger Robot
b6e0cd99c1 Merge "Add whether app optimization mode mutable in BatteryUsageDiff proto." into main 2024-08-02 03:36:39 +00:00
mxyyiyi
59e5dc720a Add whether app optimization mode mutable in BatteryUsageDiff proto.
Bug: 350657779
Test: atest ConvertUtilsTest
Flag: EXEMPT bug fix
Change-Id: I80a5e6513e1bee88f85caeed7661b10204df8a51
2024-08-02 10:41:24 +08:00
Yuri Lin
cb824ccbd9 Resize & round corners on a placeholder interstitial image
This isn't a real image yet (just draws a diagonal gradient), but should now be roughly ready for inserting the correct drawables based on the mode whenever those are available.

Bug: 332730534
Test: manual, SetupInterstitialActivityTest
Flag: android.app.modes_ui
Change-Id: I45a78950f671a989258a85525a7a8ee0c445a332
2024-08-01 18:44:27 -04:00
Yuri Lin
65548c0e56 Add interstitial for modes that are disabled but not by user
This covers both the case of navigating to the mode page through the mode aggregator menu as well as if an app sends an intent to go to the mode.

The interstitial visuals are not done yet; in particular, the image is just a gray box for now.

Manual tests done:
- visually verifying the interstitial page in both portrait and landscape
- accessing the mode page from modes list, confirming interstitial pops up
- accessing enabled and disabled-by-user mode page from modes list (no interstitial)
- getting to the mode page from intent through an app
- accessing enabled and disabled-by-user mode pages from app intent (no interstitial)
- adjusted display and font size (it looks bad with max display & font size, maybe not much to be done)

Bug: 332730534
Test: manual, ZenModeFragmentTest, SetupInterstitialActivityTest
Flag: android.app.modes_ui
Change-Id: I21f13b0842d5b118a341f7d85e8fcac947ca3a06
2024-08-01 18:44:22 -04:00
Abdelrahman Awadalla
f2d6fe9e32 Add "Touchpad visualizer" to input developer options
Bug: 286551975
Bug: 350039816
Test: atest TouchpadVisualizerPreferenceControllerTest
Test: Manual testing using
      $ adb shell settings get system touchpad_visualizer
Flag: com.android.hardware.input.touchpad_visualizer

Change-Id: Ic5de704c49aabf1a80d202aa890055f7337d45d4
2024-08-01 13:34:32 +00:00
Chelsea Hao
09f62d72d2 Merge changes Id0882547,I427e08a3 into main
* changes:
  [Audiosharing] Change text color.
  [Audiosharing] When user enters a bad code, apply error color on summary.
2024-08-01 05:50:04 +00:00
Tom Hsu
d26c804af1 Merge "[Settings]Check the Satellite modem state instead of enabled state only." into main 2024-08-01 05:27:06 +00:00
chelseahao
e85e1c823a [Audiosharing] When user enters a bad code, apply error color on summary.
Bug: 356071392
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Test: atest
Change-Id: I427e08a3cce8d0e85f29f821d9b779acc95217b1
2024-08-01 04:25:21 +00:00
tomhsu
90553d91f1 [Settings]Check the Satellite modem state instead of enabled state only.
Flag: EXEMPT bugfix
Fix: 354806125
Test: Manual test pass
Change-Id: Iaa8d1c9d3df36e40fafda0117234036d9451a4fa
2024-08-01 03:38:48 +00:00
Yiyi Shen
12469371b4 Merge "[Audiosharing] Not announce enable/disable when toggle main switch" into main 2024-08-01 03:05:58 +00:00