Check all users if anyone needs a new tab

Earlier we were making decision based on the first user that has the
SHOW_IN_SETTINGS_SEPARATE property. A later user could require a new tab
as well.

Bug: 309605138
Test: manual
Change-Id: Ib4fd88d31153974dfad07c0b815ef011b11d1567
This commit is contained in:
Manish Singh
2023-11-07 14:01:43 +00:00
parent e07cfd8b0b
commit 779cda70d9

View File

@@ -1268,7 +1268,11 @@ public final class Utils extends com.android.settingslib.Utils {
UserProperties userProperties = userManager.getUserProperties(userHandle);
if (userProperties.getShowInSettings() == UserProperties.SHOW_IN_SETTINGS_SEPARATE) {
if (Flags.allowPrivateProfile() && userProperties.getHideInSettingsInQuietMode()) {
return !userManager.isQuietModeEnabled(userHandle);
if (!userManager.isQuietModeEnabled(userHandle)) {
return true;
} else {
continue;
}
}
return true;
}