Commit Graph

2283 Commits

Author SHA1 Message Date
Chaohui Wang
1a2bf18eae Merge "Fix restriction to configure Calls & SMS" into main 2023-11-16 03:32:37 +00:00
Manish Singh
aa91f1db3a Merge "Reset Private Space settings on new space creation" into main 2023-11-15 13:55:12 +00:00
Manish Singh
7a556b851c Reset Private Space settings on new space creation
Also added PrivateSpaceMaintainerTest

Bug: 310217645
Test: atest PrivateSpaceMaintainerTest
Test: atest HidePrivateSpaceControllerTest
Test: manual
Change-Id: Ic1096fd652d23ae6aa9da1421017c08f6bc480aa
2023-11-15 12:54:20 +00:00
Peiyong Lin
714490851f Merge "Unconditionally enable ANGLE developer option UI." into main 2023-11-15 01:38:35 +00:00
josephpv
30e841ce75 Add One Lock settings inside private space settings page
This includes below changes:
1. Add new sub settings page in Private Space settings with option to
   swithch between private profile lock and device screen lock
2. Call Private profile lock setup when swithcing to private lock from
   screen lock.
3. Preference to change private lock when a separate Private lock is set

Bug: 308862923
Test: atest UseOneLockPreferenceControllerTest,
PrivateSpaceLockControllerTest

Change-Id: I0a6d8c7dfbd0ffea19db03ffd6dfe7aa520c9684
2023-11-14 21:27:10 +00:00
Chaohui Wang
9e0bd18686 Fix restriction to configure Calls & SMS
Restriction UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS is added.

Fix: 278062379
Test: manual - apply restriction no_config_mobile_networks
Test: unit test
Change-Id: I87bf2269359bbceb989fa10524d55dd7ceb55de1
2023-11-14 09:48:52 +00:00
Jacky Wang
e4761149f3 Add cancel button to Erase all data (factory reset)
Bug: 300634367
Test: unit test & manual test
Change-Id: I860955291b27ea1f7c748ac746b91153224eacb7
2023-11-10 13:32:00 +08:00
Chaohui Wang
d8b21d7846 Avoid unnecessary Html.fromHtml()
Check if string contains html tag, before call Html.fromHtml()

Fix: 308681068
Test: atest SubscriptionsPreferenceControllerTest
Test: atest ProviderModelSliceHelperTest NetworkProviderWorkerTest
Test: manual - on Internet page
Change-Id: Id914689f2861a8c997d18afd03ecfdf47b91c631
2023-11-09 11:10:43 +00:00
Chaohui Wang
478ab50c01 Prevent Erase SIM during call
By collecting call state and only enable preference when idle.

Fix: 298893271
Test: manual - on Mobile Settings during call
Test: unit tests
Change-Id: Ifd567a6b68a3efbb0b42bfa0233f7c54eca07ae1
2023-11-08 03:08:56 +00:00
josephpv
380ac9a48e Adds Google account login during private space setup
This has the following changes:
1. On profile creation starts intent to add google account to the private profile for Pixel only devices.
2. On accout sign in failed show an error screen with message to try again.
3. Moves the lock setup fragment from private to main user which now calls the helper Activity as a private user which helps to setup lock. This activity can now also be called from the planned Secondary Auth settings page to set up private profile lock.
4. On set up complete use SHOW_WORK_APPS intent as a workaroud to start launcher.

Bug: 308397617
Test: Manual setup
Change-Id: I19b95375409f015b2a5d30fdad766c2f6baa634b
2023-11-03 13:50:55 +00:00
Zoey Chen
748cf7d747 Merge "Revert "[Regional Preference] Need to remove the metrics by the metrics concil"" into main 2023-11-02 12:19:58 +00:00
Treehugger Robot
12755950a9 Merge "Revert "[Regional Preference] Need to remove the metrics by the metrics concil"" into main 2023-11-02 08:12:08 +00:00
Joshua Mccloskey
ff69c0ca2d Merge "Rear Fingerprint Enrollment" into main 2023-11-01 21:10:47 +00:00
Zoey Chen
026dfe0aa0 Revert "[Regional Preference] Need to remove the metrics by the metrics concil"
This reverts commit ae32c8e8a5.

Reason for revert: <Add metrics>

Change-Id: I85631130b975df18e7f4f6056bae7f13cf56008f
2023-11-01 07:52:57 +00:00
Zoey Chen
291564a337 Revert "[Regional Preference] Need to remove the metrics by the metrics concil"
This reverts commit abe3265390.

Reason for revert: <Add metrics>

Change-Id: I483978ffc4f2df9035b664674912836d0711b9c6
2023-11-01 07:41:06 +00:00
Chaohui Wang
fe10785679 Merge "Check MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED" into main 2023-10-31 07:15:44 +00:00
Joshua McCloskey
a98dc8d4b5 Rear Fingerprint Enrollment
Bug: 297083009
Test: atest RFPSIconTouchViewModelTest FingerprintEnrollEnrollingViewModelTest FingerprintManagerInteractorTest
Change-Id: Icc072e7d7815070087ccb50ea5937c386b06fb11
2023-10-30 22:18:56 +00:00
Graciela Putri
5c06348c93 Merge "Enable all aspect ratio options in UserAspectRatioManagerTest" into main 2023-10-27 08:46:23 +00:00
Graciela Wissen Putri
3ced0bd60d Enable all aspect ratio options in UserAspectRatioManagerTest
testGetUserMinAspectRatioEntry fails for foldables and tablets due to
some aspect ratio options being disabled. Mock Resources to return all
default aspect ratio options and strings to make test device agnostic.

Clean up unused variables and remove getLauncherApps in
UserAspectRatioManager.

Add more tests in UserAspectRatioManagerTest.

Fix: 304685321
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I6f4bbd60863be0c66139955507157619a5fc6662
2023-10-26 12:55:12 +00:00
Chaohui Wang
8a5bba1f22 Check MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED
To know whether MMS is always allowed, should check
isMobileDataPolicyEnabled(MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED)
instead of isDataEnabledForApn(ApnSetting.TYPE_MMS).

Fix: 303759893
Test: manual - toggle "MMS messages" switch
Test: unit test
Change-Id: Id0417e569ff4e3dbac1ecff9327b4a964125c122
2023-10-26 11:07:03 +00:00
josephpv
ee5e1ceb03 Start private space setup when there is no private space set
This change handles as below based on if private space already exists on device:
1. If PS doesn't exist then start the setup flow which shows a PS education screen. On setup button creates the private space.
2. If PS already exists on device then display PS settings page.

Bug: 299069146
Test: atest PrivateSpaceSettingsAuthenticatorTest
Change-Id: I46bdbaeb0210fd5b41a426f852e3f455b62c1c29
2023-10-25 21:17:33 +00:00
josephpv
eace275921 Add toggle to hide private space entry point in All Apps
This change includes implementaion for below:
1. Add a preference inside private space settings page with a toggle switch to control hide/unhide
   private space entry in All Apps
2. Store the preference value in settingsprovider for persistence.

Bug: 302682054
Test: Manual
Change-Id: Ia1a56fc2c43550e23c00a61a5ce4742e42effcbe
2023-10-25 14:46:11 +00:00
Treehugger Robot
03a064fcd1 Merge "Migrate test to TwoStatePreference" into main 2023-10-25 03:30:10 +00:00
josephpv
31b044ed6a Prompt user to Setup a device lock if not set
This add below changes on selecting private space setting:
1. Prompt user to setup device lock if not already set
2. If device lock is set authenticate user first before displaying private space settings page

Screenshot - https://screenshot.googleplex.com/4SrYHbBMJfVuoRy.png
https://screenshot.googleplex.com/6vNWm7Lg83vfnH8.png
RecordingLink - https://drive.google.com/file/d/1r4zb3ILPRqwvP5tlwfjQ9GgnDAW4vZg6/view?usp=drive_link

Bug: 289016927
Test: atest PrivateSpaceSettingsAuthenticatorTest , atest SecuritySettingsTest
Change-Id: I0e5dfb30213843c0dec60a17d01c30cd91db89b0
2023-10-24 10:42:57 +00:00
Chaohui Wang
2a166676d4 Migrate test to TwoStatePreference
Bug: 306771414
Test: m SettingsUnitTests
Change-Id: I67c8e0c7f04faba377a156587f43929ac73e500f
2023-10-24 18:14:50 +08:00
Peiyong Lin
aad20f216d Unconditionally enable ANGLE developer option UI.
Bug: b/283781993
Test: atest CtsAngleIntegrationHostTestCases -c
Test: atest SettingsRoboTests:GraphicsDriverEnableAngleAsSystemDriverControllerTest
Change-Id: I7f491151cc26dc10ccdb2900cfa81ff09c23b184
2023-10-23 20:39:46 +00:00
Chaohui Wang
d1577c5e68 Remove NetworkProviderSimsCategoryController
Which no real logic in it, just a proxy of
NetworkProviderSimListController.

Bug: 302628642
Test: manually - on MobileNetworkListFragment
Test: robo test
Change-Id: I4785ac9509f92f5a778e1bda1f8da12e2880589e
2023-10-19 15:56:22 +08:00
Chaohui Wang
dae71fffb4 Dismiss the open dialog if preference is disabled
In EnabledNetworkModePreferenceController, to prevent user changing the
value.

Fix: 304952402
Test: manually - open dialog, then received a call
Change-Id: Ia1be0840b061c796f72bf5053870fa9e90bd215f
2023-10-18 19:50:35 +08:00
Treehugger Robot
415ee62af8 Merge "Validate ringtone URIs before setting" into main 2023-10-18 02:04:10 +00:00
Wu Ahan
daa7f4f3cd Merge "Reland sfps enroll improvement feature with feature provider" into main 2023-10-18 01:48:38 +00:00
Treehugger Robot
f17e4138b8 Merge "Add tests for Education" into main 2023-10-17 08:36:01 +00:00
Wu Ahan
667341c343 Reland sfps enroll improvement feature with feature provider
Prior cl, ag/24720067, was reverted due to platinum failed,
this cl fixes the fails (NPE on UDFPS).

Bug: 288155127
Bug: 305132251
Test: Manually check on Lynx and Felix
Test: atest BiometricsE2eTests:FingerprintEnrollSuccessTest
Test: abtd for platinum, see b/305048300#comment14
Change-Id: I90f4ea14853edf03abd8ffe0b7874894eb2d4f81
2023-10-16 15:23:18 +00:00
Peiyong Lin
ccf778a8a0 Merge "Allow ANGLE developer option toggle UI enabled if ANGLE is enabled." into main 2023-10-13 04:57:32 +00:00
Hao Dong
03af4571e3 Add tests for Education
Test: atest FingerprintEnrollFindSensorViewModelV2Test
Bug: 295206773

Change-Id: I741ddf49fccae7a301e2fb79194ce8cc6b966070
2023-10-13 00:51:55 +00:00
Peiyong Lin
8e6af783ce Allow ANGLE developer option toggle UI enabled if ANGLE is enabled.
Previously the ANGLE developer option toggle UI was disabled by default
and a user would need to use adb command to set the debug property to
true to enable it, and every reboot would reset the debug property to
false again and hence disable the toggle UI again. However, since ANGLE
is still in experiment, we would like to make sure it's not easy to
enable but easy to disable. This patch keeps ANGLE toggle UI enabled
when ANGLE is enabled so that users can easily disable. Once ANGLE is
disabled, if the debug property is not set to true, the toggle UI will
remain disabled.

Bug: b/293503000
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest SettingsRoboTests:GraphicsDriverEnableAngleAsSystemDriverControllerTest
Change-Id: I2e63431cd0d8cf4712fc278646627fbf34a2b542
2023-10-13 00:36:36 +00:00
Priyanka Advani
fc3433b454 Merge "Revert "Implement sfps enroll improvement feature with feature provider"" into main 2023-10-12 21:07:27 +00:00
Priyanka Advani
a99bab5b57 Revert "Implement sfps enroll improvement feature with feature provider"
This reverts commit 2ffe187d1b.

Reason for revert: Likely culprit for b/305048300

Change-Id: Ia9d2d98bcb09d63dacde7134c20ded2ed51f9ab4
2023-10-12 19:02:20 +00:00
Graciela Putri
39386158b7 Merge "Remove 4:3 aspect ratio option for foldables" into udc-qpr-dev am: 2147c152ac am: 94f7219937
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/25007832

Change-Id: I08c0fcfe2c81b9c36b63165233e844e975bf93e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-12 10:00:30 +00:00
Wu Ahan
8fb032a73f Merge "Implement sfps enroll improvement feature with feature provider" into main 2023-10-12 09:54:51 +00:00
Graciela Putri
94f7219937 Merge "Remove 4:3 aspect ratio option for foldables" into udc-qpr-dev am: 2147c152ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/25007832

Change-Id: Iab27c31c7512f4f7e48d8b10d410044c4db39aa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-12 09:28:31 +00:00
Krzysztof Kosiński
15e17e0119 Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I8aab463c74d5e869d949a2b712886a9cc4d15709
Merged-In: I8aab463c74d5e869d949a2b712886a9cc4d15709
2023-10-11 19:41:36 +00:00
Krzysztof Kosiński
c81fbcef2e Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I8aab463c74d5e869d949a2b712886a9cc4d15709
2023-10-11 19:39:33 +00:00
Wu Ahan
2ffe187d1b Implement sfps enroll improvement feature with feature provider
Bug: 288155127
Test: Manually
Test: atest FingerprintEnrollEnrollingTest.java
Change-Id: Idb6e5afab4b9cbf8f2ed26819a55dcb34acb1ab9
2023-10-11 08:37:44 +00:00
Graciela Wissen Putri
e6c4beca80 Remove 4:3 aspect ratio option for foldables
Bug: 304260896
Test: atest UserAspectRatioManagerTest
Change-Id: I8a745c90e45e8776eef082e01dc2155fe6b353b6
2023-10-10 17:18:48 +00:00
Chaohui Wang
b19eb9a4c2 Create AppDataUsageListController
For better organization and testings.

Bug: 240931350
Test: manual - on AppDataUsage
Test: unit test
Change-Id: I77ceeccc7055fcd948fe40d5dfb9cc4a9b9ad2ee
2023-10-07 15:03:27 +08:00
Valentin Iftime
323fbda20e Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-06 15:44:17 +02:00
Gil Cukierman
18403f2adc Merge changes from topic "cukie-300248708-hide2gremoval" into main
* changes:
  Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
  Add feature flag for removal of KEY_HIDE_ENABLE_2G
2023-10-04 20:12:53 +00:00
Gil Cukierman
761fd612c4 Stop honoring CarrierConfigManager.KEY_HIDE_ENABLE_2G
KEY_HIDE_ENABLE_2G is soft removed in Android API level 35
because it hides a security feature. This patch
introduces simplified logic that ignores the
carrier config value. The new behavior is behind a feature flag.

This patch also includes some cleanup.
1. It removes an unneeded check for null carrier config
2. It removes test logic that set the value of KEY_HIDE_ENABLE_2G
   in places where it had no impact on the test.

Bug: 300248708
Test: atest Enable2gPreferenceControllerTest
Change-Id: I892d115d1ae173d2f3cd69e8f8b97bc5bfa7c67b
2023-10-04 13:59:55 +00:00
Zoey Chen
c2522b8f9d [ToA] Terms of Address UI, fragment in LocaleListPicker
Test: atest TermsOfAddressCategoryControllerTest
Test: adb shell device_config put settings_globalintl com.android.settings.flags.terms_of_address_enabled true
Bug: 295826542
Bug: 297798866
Change-Id: I2b9af7cbe7cab0bb7b2168bc99f0fa7bc0903ac2
2023-10-03 06:36:05 +00:00
Hao Dong
d11b9d1647 Merge "Use shared lib for settings v2." into main 2023-09-30 17:25:52 +00:00