From eaafcbcb286c9d7213d4ed91ab0933490996d572 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Mon, 27 Nov 2023 17:31:06 +0000 Subject: [PATCH] Remove unnecessary flag check This code is to remove the user which shouldn't be shown when in quiet mode - if anything, it's better to keep this not behind the flag. Also, the user property is not behind the flag. Bug: 312976400 Test: manual Change-Id: Ic66a53bf7608848df223914b0fe78ed00b86db70 --- .../dashboard/profileselector/ProfileSelectDialog.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectDialog.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectDialog.java index 561a51ae84d..308673b1465 100644 --- a/src/com/android/settings/dashboard/profileselector/ProfileSelectDialog.java +++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectDialog.java @@ -27,7 +27,6 @@ import android.content.Intent; import android.content.pm.UserInfo; import android.content.pm.UserProperties; import android.os.Bundle; -import android.os.Flags; import android.os.UserHandle; import android.os.UserManager; import android.util.Log; @@ -187,8 +186,7 @@ public class ProfileSelectDialog extends DialogFragment implements UserAdapter.O UserInfo userInfo = userManager.getUserInfo(userHandles.get(i).getIdentifier()); if (userInfo == null || userInfo.isCloneProfile() - || (Flags.allowPrivateProfile() - && shouldHideUserInQuietMode(userHandles.get(i), userManager))) { + || shouldHideUserInQuietMode(userHandles.get(i), userManager)) { if (DEBUG) { Log.d(TAG, "Delete the user: " + userHandles.get(i).getIdentifier()); } @@ -221,8 +219,7 @@ public class ProfileSelectDialog extends DialogFragment implements UserAdapter.O UserInfo userInfo = userManager.getUserInfo(userHandle.getIdentifier()); if (userInfo == null || userInfo.isCloneProfile() - || (Flags.allowPrivateProfile() - && shouldHideUserInQuietMode(userHandle, userManager))) { + || shouldHideUserInQuietMode(userHandle, userManager)) { if (DEBUG) { Log.d(TAG, "Delete the user: " + userHandle.getIdentifier()); }