Add enable_private_space_features flag check for Private Space implementation
Bug: 326060689 Test: Manual Change-Id: I82105714e74789394a3d46b852aaa3e7b93e5877
This commit is contained in:
@@ -32,6 +32,8 @@ public class DefaultCombinedPickerPrivate extends DefaultCombinedPicker {
|
|||||||
|
|
||||||
/** Returns whether the user is handled by this fragment. */
|
/** Returns whether the user is handled by this fragment. */
|
||||||
public static boolean isUserHandledByFragment(UserManager userManager) {
|
public static boolean isUserHandledByFragment(UserManager userManager) {
|
||||||
return android.os.Flags.allowPrivateProfile() && userManager.isPrivateProfile();
|
return android.os.Flags.allowPrivateProfile()
|
||||||
|
&& android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
|
&& userManager.isPrivateProfile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -164,6 +164,7 @@ class AppDataUsageRepository(
|
|||||||
|
|
||||||
private fun shouldSkipProfile(userManager : UserManager, userHandle: UserHandle): Boolean {
|
private fun shouldSkipProfile(userManager : UserManager, userHandle: UserHandle): Boolean {
|
||||||
if (android.os.Flags.allowPrivateProfile()
|
if (android.os.Flags.allowPrivateProfile()
|
||||||
|
&& android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
&& android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()) {
|
&& android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()) {
|
||||||
return (userManager.isQuietModeEnabled(userHandle)
|
return (userManager.isQuietModeEnabled(userHandle)
|
||||||
&& userManager.getUserProperties(userHandle).showInQuietMode
|
&& userManager.getUserProperties(userHandle).showInQuietMode
|
||||||
|
@@ -68,6 +68,7 @@ public class LocationForPrivateProfilePreferenceController
|
|||||||
@Override
|
@Override
|
||||||
public int getAvailabilityStatus() {
|
public int getAvailabilityStatus() {
|
||||||
if (!android.os.Flags.allowPrivateProfile()
|
if (!android.os.Flags.allowPrivateProfile()
|
||||||
|
|| !android.multiuser.Flags.enablePrivateSpaceFeatures()
|
||||||
|| !android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()
|
|| !android.multiuser.Flags.handleInterleavedSettingsForPrivateSpace()
|
||||||
|| !isPrivateProfileAvailable()) {
|
|| !isPrivateProfileAvailable()) {
|
||||||
return CONDITIONALLY_UNAVAILABLE;
|
return CONDITIONALLY_UNAVAILABLE;
|
||||||
|
@@ -46,7 +46,8 @@ public class PrivateSpaceGaiaEducationFragment extends InstrumentedFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
if (android.os.Flags.allowPrivateProfile()) {
|
if (android.os.Flags.allowPrivateProfile()
|
||||||
|
&& android.multiuser.Flags.enablePrivateSpaceFeatures()) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user