Commit Graph

22952 Commits

Author SHA1 Message Date
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
Treehugger Robot
793253aaf2 Merge "Reduce flaky of BackgroundInstalledAppsPageProviderTest" into main 2024-08-05 03:11:39 +00:00
Chaohui Wang
210529efc4 Reduce flaky of BackgroundInstalledAppsPageProviderTest
Bug: 355413226
Flag: EXEMPT test only
Test: atest BackgroundInstalledAppsPageProviderTest
Change-Id: Iede656b7cf34bac82718f0aff12ee28cbaa9d8f8
2024-08-05 10:23:02 +08:00
Chaohui Wang
45aa574b9b Merge "Show uncheck toggle when wep not supported" into main 2024-08-05 02:02:20 +00:00
Allen Su
bf0b93b104 [ToA] Fix unit test failure
Flag: TEST_ONLY
Bug: 328697623
Test: atest TermsOfAddressCategoryControllerTest
Change-Id: Iddbf5b1ca16e455dfa12b9a9a6543d366b62d55e
2024-08-04 17:01:26 +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
Chaohui Wang
c311354d10 Show uncheck toggle when wep not supported
When wep not supported, wep is always not allowed, so we should show
unchecked toggle for "Allow WEP networks"

Bug: 356326814
Flag: EXEMPT bug fix
Test: manual - on Network preferences
Test: atest WepNetworksPreferenceControllerTest
Change-Id: I408434fbbf48e1010710ecf3bf9f7988e521b076
2024-08-02 11:43:20 +08: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
Chun-Ku Lin
1c3cc5bedd Merge "Physical keyboard related options shouldn't be searchable when invisible" into main 2024-07-31 19:09:06 +00:00
Chun-Ku Lin
767f58785a Physical keyboard related options shouldn't be searchable when invisible
Physical keyboard options category is hidden when there is no hardware
keyboard. It's related preferences are hidden in this case. Hence those
preferences shouldn't be searchable.

Bug: 351047456
Test: manually search "bounce keys", "sticky keys" and "slow keys",
they're not searchable when invisible on Accessibility page
Test: atest
Flag: com.android.settings.accessibility.fix_a11y_settings_search

Change-Id: I1eb465dd34e59d856bb1fa7c06bc253971a8c8d0
2024-07-31 18:04:55 +00:00
Treehugger Robot
e79de39723 Merge "Revert^2 "Tweak Modes layouts and use updated strings to match mocks"" into main 2024-07-31 17:35:10 +00:00
Diya Bera
bc915e7bdc Merge "Add mandatory biometric prompt to platform surfaces (4/N)" into main 2024-07-31 17:06:14 +00:00
Matías Hernández
4222bed264 Revert^2 "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 9804955ad5.

Reason for revert: Wrongly reverted; unrelated to the error

Change-Id: I94a2b05589fa80218db184e192f1c4a633ab61b0
2024-07-31 15:45:11 +00:00
ELIYAZ MOMIN
39a56459a5 Merge "Revert "Tweak Modes layouts and use updated strings to match mocks"" into main 2024-07-31 15:40:04 +00:00
Tetiana Meronyk
593f96a559 Merge "Fix toggle when no_user_switch is applied without EnforcedAdmin" into main 2024-07-31 15:11:42 +00:00
ELIYAZ MOMIN
9804955ad5 Revert "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 0359aaeb47.

Reason for revert: <Potential culprit for b/356564046  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: I980838773078d822d20608e5975a26cf8dbed2be
2024-07-31 14:56:30 +00:00
Tetiana Meronyk
061669815a Fix toggle when no_user_switch is applied without EnforcedAdmin
If EnforcedAdmin is null, calling setDisabledByEnforcedAdmin does not disable the setting. So if this restriction was applied by a source different than admin, the toggle was still active for users to change (even non-main).

After this change, the restriction is correctly processed both when it is applied by admin or by some other source.

Bug: 356387759
Test: atest MultiUserSwitchBarControllerTest
Flag: android.multiuser.fix_disabling_of_mu_toggle_when_restriction_applied
Change-Id: I5d38e250359ccbee67ac747f1d8a0a2143f4c216
2024-07-31 13:55:10 +00:00
Matías Hernández
0b7a22210a Add new icons to the Modes icon picker
Bug: 333901673
Test: atest IconOptionsProviderImplTest
Flag: android.app.modes_ui
Change-Id: I6fa15fa12238eb9c0d1b93803010349b9092812b
2024-07-31 14:12:37 +02:00
Yiyi Shen
124a9e1ebd [Audiosharing] Not announce enable/disable when toggle main switch
Fix: 356318679
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I3331f9ded48352f442712287a6b536da883fe73d
2024-07-31 18:56:33 +08:00
Matías Hernández
d21dec33d1 Merge "Fix Zen tests that were failing with modes_ui enabled" into main 2024-07-31 09:21:04 +00:00
Chaohui Wang
b7f68b4a60 Merge changes from topic "MobileNetworkSettingsSearchIndex" into main
* changes:
  Fix search for MMS Message
  Show category when search "Mobile data"
2024-07-31 09:07:20 +00:00
Matías Hernández
fa494a6d46 Merge "Tweak Modes layouts and use updated strings to match mocks" into main 2024-07-31 07:34:43 +00:00
Yiyi Shen
ec282ed60b Merge "[Audiosharing] Clean up dup codes" into main 2024-07-31 05:20:39 +00:00
Chaohui Wang
86e5406c46 Merge "Reduce flaky of InstantAppDomainsPreferenceTest" into main 2024-07-31 03:45:02 +00:00
Joshua Mccloskey
a2b127bbe8 Merge "Remove face/fignerprint search if not present" into main 2024-07-30 23:02:58 +00:00
Daniel Norman
0e44239daf Never restricts Accessibility Activities based on ECM/admin.
Keeps accessibility activity preference as inheriting from
RestrictedPreference since it shares lots of behavior with the
accessibility service perference (same base class), but always
calls setEnabled(true) for activities.

Fix: 331990900
Flag: com.android.settings.accessibility.never_restrict_accessibility_activity
Test: atest RestrictedPreferenceHelperTest
Change-Id: I39971bc3f65aa630fa62a0e31132f177fd21b635
2024-07-30 21:34:23 +00:00
Diya Bera
8f0c77bb19 Add mandatory biometric prompt to platform surfaces (4/N)
1. Enable developer options via build info
2. Enable developer options via toggle under system -> developer options

Flag: android.hardware.biometrics.flags.mandatory_biometrics
Fixes: 355500452
Test: atest BuildNumberPreferenceControllerTest
DevelopmentSettingsDashboardFragmentTest

Change-Id: Iecbe34024d287e71e235becec3ce5a2bd5c1697f
2024-07-30 20:36:31 +00:00
Joshua McCloskey
ed59922ca8 Remove face/fignerprint search if not present
Test: Verified manually with a device that if face/fingerprint are not
present they do not show up.
Fixes: 350599580
Flag: EXEMPT bugfix

Change-Id: I6a691d2985e4839336e9c08dfa6c97abe23f43f2
2024-07-30 18:14:41 +00:00