Disable PS entry point and Activity when PS is not allowed.

In this change we disable:
1. Security Center Entry point
2. PrivateSpaceAuthenticationActivity

when private profile is not present and cannot be added.

Additionally, the intent exposing PrivateSpaceAuthenticationActivity
is also non-exported and changed to a better name.

Bug: 328578044
Test: Manual build and flash
Change-Id: I13d298316c6d719d0b06e4969989ea1da83dd4c6
This commit is contained in:
Himanshu Gupta
2024-03-21 14:14:02 +00:00
parent 9c50f2c61d
commit 5e451db395
5 changed files with 87 additions and 8 deletions

View File

@@ -155,7 +155,7 @@ public class PrivateSpaceMaintainer {
return true;
}
List<UserInfo> users = mUserManager.getProfiles(0);
List<UserInfo> users = mUserManager.getProfiles(mContext.getUserId());
for (UserInfo user : users) {
if (user.isPrivateProfile()) {
mUserHandle = user.getUserHandle();