From 779cda70d99cf14928a15dc8145ff3070dbafa8b Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 7 Nov 2023 14:01:43 +0000 Subject: [PATCH] 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 --- src/com/android/settings/Utils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java index 29eabdb7fff..2113b5d2c62 100644 --- a/src/com/android/settings/Utils.java +++ b/src/com/android/settings/Utils.java @@ -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; }