Add an additional flag guard for Private Space implementation
This a layer of flag guarding only for the implementation of Private Space features excluding the APIs. The MVP flag allow_private_profile still guards all the features including the APIs. Bug: 326060689 Test: Manual - a few verifications that some feeatures are unavailable when this flag is disabled Test: Run presubmits and verify that nothing breaks Change-Id: I05f7e2f20c6132b33484bb133ce03a933ece485f
This commit is contained in:
@@ -416,6 +416,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
public String getHint(Context context, boolean isAlpha, int type, ProfileType profile) {
|
||||
if (isAlpha) {
|
||||
if (android.os.Flags.allowPrivateProfile()
|
||||
&& android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||
&& profile.equals(ProfileType.Private)) {
|
||||
return context.getString(alphaHintForPrivateProfile);
|
||||
} else if (type == TYPE_FINGERPRINT) {
|
||||
@@ -433,6 +434,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
}
|
||||
} else {
|
||||
if (android.os.Flags.allowPrivateProfile()
|
||||
&& android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||
&& profile.equals(ProfileType.Private)) {
|
||||
return context.getString(numericHintForPrivateProfile);
|
||||
} else if (type == TYPE_FINGERPRINT) {
|
||||
@@ -1147,7 +1149,9 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
/*flags=*/0).getSystemService(UserManager.class);
|
||||
if (userManager.isManagedProfile()) {
|
||||
return ProfileType.Managed;
|
||||
} else if (android.os.Flags.allowPrivateProfile() && userManager.isPrivateProfile()) {
|
||||
} else if (android.os.Flags.allowPrivateProfile()
|
||||
&& android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||
&& userManager.isPrivateProfile()) {
|
||||
return ProfileType.Private;
|
||||
} else if (userManager.isProfile()) {
|
||||
return ProfileType.Other;
|
||||
|
Reference in New Issue
Block a user