Commit Graph

146 Commits

Author SHA1 Message Date
Olivier Nshimiye
5e4fad8a4a Prompt user to set device lock before deleting private space from Reset options
New flow: http://shortn/_qLrrqpdfJc

Flag: EXEMPT Bugfix in a low risk scenario
Bug: 363050220
Test: atest ResetOptionsDeletePrivateSpaceControllerTest
Change-Id: I93f55cd94ed2f42d5c19e2686d3edb3920bf750d
2024-09-10 09:06:32 +00:00
josephpv
af87233e1e Show different error screen for PS creation based on error
This contains the change to show a different fragment on private space
creation error based on the error code returned by UserManager.
On private space create error checks for the returned error code and if
PS is not supported on the device showns error screen containing a link to Help
Center atricle to find out more about the reason for profile creation
failure.

ACTION_PRIVATE_SPACE_SETUP_SPACE_ERRORS metric is logged with the error
code on create error else 0 on sucessful space creation.

Recording: b/340130375#comment17

Bug: 340130375
Test: Manual
Flag: android.multiuser.show_different_creation_error_for_unsupported_devices
Change-Id: Ifa0345fb6aad64599009f8aa79d168f57fd35c03
2024-08-02 10:03:12 +00:00
Joseph Vincent
844aad4213 Merge "Adding owners for privatespace" into main 2024-07-24 18:53:14 +00:00
josephpv
b3b8160c3f Adding owners for privatespace
Bug: 340130375
Test: Build

Flag: EXEMPT adding owners file
Change-Id: I149206896e1522cc730fc47061e4ae7071742f63
2024-07-24 18:09:43 +00:00
Joseph Vincent
9ce298db71 Merge "Remove todo from PrivateSpaceMaitainer code" into main 2024-07-24 11:59:26 +00:00
Joseph Vincent
83b2d86ff5 Merge "Check config to Show/Hide Private space Hide Illustration" into main 2024-07-23 21:41:17 +00:00
josephpv
f5d279c9a2 Check config to Show/Hide Private space Hide Illustration
Enable/disable the search tile content and hide illustration
in Hide Private Space Settings page based on the config value.
By default the config value is set to true which will be used in Pixel
to show the illustration and search tile content.

OEM can set value of config_enableSearchTileHideIllustrationInPrivateSpace in the device
overlay file to false to disable it and with this change it is taken
care to hide them if the config value is false

Screenshot:
go/ss/56WxtgXd5NSqVFm.png

Bug: 346612477
Test: Manual
Flag: android.multiuser.private_space_search_illustration_config
Change-Id: Ia9fbdebd9a220f4d995369d662a75989f07a2916
2024-07-23 10:25:20 +00:00
josephpv
83b49e06c2 Remove Biometric Option from Private Space Lock Setup in Settings
With this change when secondary unlock factor for private space is
initiated from settings page only the option to set traditional unlock
factors will be shown and biometric option will not be shown.
User will return to private space unlock settings screen. User should be
able to  manually set up biometrics form its dedicatated settings entry
point after authentication.

Recording:
b/332850595#comment7

Flag: android.multiuser.modify_private_space_secondary_unlock_setup_flow
Bug: 332850595
Test: Manual
Change-Id: I8feb8c23300ddb537c428f3675178c5ff49932d1
2024-07-18 22:52:48 +00:00
josephpv
a5ca3c2c9b Remove todo from PrivateSpaceMaitainer code
This change removes the TODO comment that was tracking to move over to
Biometric intent KeyguardManager.createConfirmDeviceCredentialIntent.
The hidden KeyguardManager.createConfirmDeviceCredentialIntent is being
used by various frameworks clients and is still avialable for use in settings.

Bug: 304796434
Test: Manual
Flag: EXEMPT removing todo
Change-Id: I5566d56e743e88afbcca0c4167c8a797e41b1a97
2024-07-17 11:26:52 +00:00
Olivier Nshimiye
2dc4310630 Merge "Remove settings tasks on private space deletion" into main 2024-06-13 09:47:49 +00:00
Joseph Vincent
8e103fc4fd Merge "Add accessibility delegate and populate itemCount" into main 2024-06-13 05:39:33 +00:00
Olivier Nshimiye
38a08fe98d Remove settings tasks on private space deletion
Bug: 342074934
Test: atest PrivateSpaceMaintainerTest
Test: Manual on device

Change-Id: Ic0555583ae0d7ea5650d819f1fccbd022b1d64c2
2024-06-12 15:40:43 +00:00
josephpv
44131dbc24 Add accessibility delegate and populate itemCount
Change made to fix accessibility issue for talkback to announce correct
number in the list numbers as suggeste in b/333672369#comment4

Bug: 333672369
Test: Manual
Change-Id: I7f4ed0b39a40040c1185809e0b348d12e1eabf29
2024-06-12 09:25:09 +00:00
Joseph Vincent
98a5dbfb42 Merge "Fix for settings crash during PS setup" into main 2024-06-11 10:59:22 +00:00
josephpv
26cda0dd42 Fix for settings crash during PS setup
Fix for Null pointer exception to add null checks before calling
unRegisterReceiver for broadcast and startActivity.

Bug: 346233086
Test: Manual
Change-Id: I0941c34c3f5912c57abc9497809962ed0954ac06
2024-06-11 04:56:48 +00:00
josephpv
8298c15f53 Remove animation from private space settings page
Screenshot : go/ss/5HeSbdABvUX3iw8.png

Bug: 337866252
Test: Manual
Change-Id: If54ff5f2e309b9ac4dd83ff3bbf53812031732c6
2024-06-10 05:20:01 +00:00
Joseph Vincent
b6e9469834 Merge "Revert "Add footer in private space auto lock settings page"" into main 2024-06-07 10:24:38 +00:00
Joseph Vincent
a4ce3bec70 Revert "Add footer in private space auto lock settings page"
This reverts commit 5fd6d6435b.

Reason for revert: As per b/343166689#comment4 this change as this is not needed based on the feedback from leads review.

Change-Id: Iad31aafbce5f3f9fc37fdd8fb4d5582cfae9d8b7
2024-06-07 09:18:54 +00:00
Joseph Vincent
4885f1833c Merge "Remove temp GAIA education screen from PS setup code" into main 2024-06-07 02:47:30 +00:00
josephpv
d27f97393d Remove temp GAIA education screen from PS setup code
With this change the temp GAIA education screen is removed from private
space setup code and adds a new loading screen with "Just a sec" title
in the activity while the gms intent in launched to fix blank screen issue.

Screenrecording link:
b/336822960#comment7

Bug: 336822960
Test: Manual
Change-Id: I9ee41835b39c194fefb970321b7a9d5a30f87306
2024-06-06 17:18:55 +00:00
Olivier Nshimiye
736e359b49 Merge "Update the biometric unlock logo to Private Space logo" into main 2024-06-06 06:53:49 +00:00
Jigar Thakkar
d9b417cd72 Merge "Hide private space settings app post setup" into main 2024-06-05 11:44:42 +00:00
Olivier Nshimiye
14d4b41363 Update the biometric unlock logo to Private Space logo
All activities that use biometric login through the CDCA class show a
Settings icon in the prompt. This cl adds a capability for the client of
the CDCA to set icon and icon description as extras to the unlock
intent.

Screenshot: http://shortn/_OpKTYFtddM

Bug: 333528540
Test: Manually verified on the device

Change-Id: Id7b5a3fe575069bef1810769e4f437e717d2d3c6
2024-06-05 10:36:25 +00:00
Jigar Thakkar
b48a4469ac Hide private space settings app post setup
Currently, the changes to disable private space settings app component
are located in SettiingsInitialize.java. These get triggered when
ACTION_USER_INITIALIZE is received by the settings app inside the
private profile user. However, we are stopping the private profile user
at the end of the setup flow. This can lead to a scenario wherein
ACTION_USER_INITIALIZE is relayed by the system server but not received
by the private space settings app, since it was stopped. To over come
this issue, we move the changes to disable the private space settings
app component inside the private space setup flow (right after the user
is created and started).

Bug: 342165140
Test: atest PrivateSpaceMaintainerTest#createPrivateSpace_psDoesNotExist_setsPrivateSpaceSettingsComponentDisabled
Flag: ACONFIG android.multiuser.enable_private_space_features NEXTFOOD
Change-Id: Ib9baac1e9d835ea5a27c15d499e10615b84cf97b
2024-06-05 10:11:33 +00:00
josephpv
5fd6d6435b Add footer in private space auto lock settings page
Add a footer note to private space auto lock settings page that apps in
private space may need to be authenticated unlock when a separate lock
is set for private space.

Screenshot:
go/ss/7fE8epun3A2hgq4.png

Bug: 343166689
Test: Manual
Change-Id: I18c650eba128da512116a3166babb49f7ef33bb3
2024-05-29 19:07:20 +00:00
Joseph Vincent
9ebdedd2f6 Merge "Private space auto lock on device restart during setup" into main 2024-05-29 02:12:44 +00:00
josephpv
7ef9c46afa Private space auto lock on device restart during setup
After creation of private space value of auto-lock setting is explicitly
set to lock on device restarts. Just before the end of the setup flow
the auto-lock setting is changed to auto-lock on device lock before the
last screen of private space setup.

Bug: 342398315
Test: atest PrivateSpaceMaintainerTest
Change-Id: I8eeb0058c7ecb31d6e30b4cc78ec5877ed316f75
2024-05-28 16:27:09 +00:00
Himanshu Gupta
63da8c35f7 Do not move to ALL_APPS when default Launcher is not system.
Currently we fire ALL_APP intent for System Launchers at the
end of PS setup flow, even when the system launcher (NexusLauncher)
was not the default Launcher.

In such cases, the user is moved to NexusLauncher, but they cannot
unlock PS (only default launcher can do it), leading to crashes.
To fix this, we do not fire the intent in case non system Launcher
has the HOME role.

Bug: 331722929
Test: Manual build and flash
Flag: NA
Change-Id: I77353474cc74028d72508c433c89b6116b4148bd
2024-05-24 08:17:01 +01:00
Treehugger Robot
1b1c159d9f Merge "Kill tasks that are neither visible nor in focus" into main 2024-05-20 14:27:25 +00:00
Manish Singh
9447b63197 Kill tasks that are neither visible nor in focus
Bug: 336754145
Test: manual
Change-Id: I559886b172c0f2e6a5d9882f8109b8d51644315c
2024-05-17 13:22:42 +00:00
Manish Singh
29cd25e8a8 Merge "Apply the AlertDialog theme" into main 2024-05-17 08:08:44 +00:00
Manish Singh
a270176634 Apply the AlertDialog theme
so that the correct colors are applied when the system contrast is
changed.

Bug: 335712994
Test: manual
Change-Id: I2f6ba3360fc4935db302e8d89f4df8d200a43a29
2024-05-16 18:26:34 +00:00
Manish Singh
ef8194e7d9 Change default lock to every time device locks
Fix: 339826512
Test: manual
Test: atest PrivateSpaceMaintainerTest
Test: atest AutoLockPreferenceControllerTest
Change-Id: I9f5f028666ac409ab6c732a440b2202f31839c9f
2024-05-14 11:16:53 +00:00
Manish Singh
51dd526faf Support multi-pane deeplink in PrivateSpaceAuthenticationActivity
Bug: 334792208
Fix: 336996032
Test: manual
Change-Id: I0cffe64faa1f0981ee09e3775249efcd7073d7ce
2024-05-09 13:07:37 +00:00
Manish Singh
0f4d761d93 Merge "Don't send data for non-main users" into main 2024-04-29 11:51:46 +00:00
Joseph Vincent
812eef847e Merge "Add line break strategy to remove header hyphenation" into main 2024-04-26 09:54:00 +00:00
Manish Singh
50b5bae531 Don't send data for non-main users
This is a regression caused by ag/26661827

Fix: 333872544
Test: manual
Test: atest PrivateSpaceSafetySourceTest
Change-Id: I0465899af3745fa39eab8806dbceb347d70b0aa3
2024-04-25 12:23:40 +00:00
josephpv
f58acef107 Clear settings task on deleting private space
When private space is deleted from private space settings launched from
the All apps settings cog the settings sub activity is not cleared and
visibile in recents.
With this change it is taken care to remove and clear the sub settings
task hosting the Private space settings page when private space does not
exist and to make sure the activity is removed if it is the last
activity in that stack.

Bug: 333538964
Test: Manual
Change-Id: I22ba8ca8d2947c6604280cf398cd47434038d542
2024-04-23 13:30:15 +00:00
josephpv
35661f7d65 Add line break strategy to remove header hyphenation
This change sets line break strategy and the max lines limit for the
private space setup choose lock screen header

Screenshot:
go/ss/8CFXUAUkKXAZiPM.png

Bug: 331538317
Test: Manual
Change-Id: I8c8bd8d130dc0d61d050d274ac0b734a6c5e3d21
2024-04-23 12:12:25 +00:00
Manish Singh
82e6ad5098 Merge "PrivateSpaceAuthenticationActivity to support dual-pane mode" into main 2024-04-23 09:58:57 +00:00
Jason Chiu
8375c61a46 PrivateSpaceAuthenticationActivity to support dual-pane mode
Test: visual
Fix: 334792208
Change-Id: Ibae659daa45e93ac3ac53fce4cbcdaed258ba6a3
2024-04-23 14:02:38 +08:00
Joseph Vincent
1946b4a669 Merge "Remove logs revealing private space existence" into main 2024-04-19 19:59:39 +00:00
josephpv
58050a6f56 Update string in Delete private space dialog
Screenshot : go/ss/BuyAQZLToiv3z3K.png

Bug: 335454847
Test: Manual
Change-Id: I95c8472f494793212d10d8968017780b3739c294
2024-04-18 20:06:51 +00:00
josephpv
8c45e82c35 Remove logs revealing private space existence
With this change logs which can reveal private space existence when
private space is locked are removed.

Bug: 334040689
Test: Manual
Change-Id: I09e01db839569ca5cc995b72ece6fe25916788a8
2024-04-18 19:00:12 +00:00
josephpv
b35fa82b3d Launch full screen private space setup on Fold when unfolded
This change takes care to launch the private space setup in whole screen
on Fold device whenever the device is unfolded.

Screenshot: go/ss/6D9EwMaLp7LFbsH.png
Recording: b/324260315

Bug: 324260315
Test: Manual
Change-Id: I5bc7b7c8fbc880b6274ddd287a8a169b49843f1b
2024-04-16 07:28:21 +00:00
josephpv
83f73732de Set SKIP_FIRST_USE_HINTS setting for private space
With this change the value of Secure settings SKIP_FIRST_USE_HINTS is
set for private profile after creation of profile in PS setup flow.

The value is set for the profile user so that first launch of an app in
private space will not display introductory hints.

Bug: 325596557
Test: PrivateSpaceMaintainerTest
Change-Id: I63a967bba052a3dcb4742c95b89c6da19aba74d5
2024-04-15 10:47:42 +00:00
Joseph Vincent
1759f174fb Merge "Update string and button choice in PS lock setup screen" into main 2024-04-12 16:33:05 +00:00
josephpv
d562080b75 Update string and button choice in PS lock setup screen
Screenshot : go/ss/93jhuNKsPPzDvzy.png
Recording link : b/334013507#comment5

Bug: 334013507
Test: Manual
Change-Id: I03e1e5297c69f1d5154a45481f54d4207f454bd4
2024-04-12 14:33:26 +00:00
josephpv
a7603d2b43 Handle startProfile failure during creation of private space
This includes to verify return value of startProfile to check if profile
is started successfully. If startProfile failed for any reason then
delete the created profile and return false for createPrivateProfile().

Bug: 313926659
Test: atest PrivateSpaceMaintainerTest
Change-Id: I493cb3a41cef8bdc1be42fe328c4f7bd04944b94
2024-04-11 15:59:43 +00:00
josephpv
3978c30817 Handle private space account login skip result
Bug: 320460786
Test: Manual
Change-Id: I59ad178a7925ef1680e67deb5321ec6d0c702e73
2024-04-10 14:39:10 +00:00