Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcafdcff authored by Olivier Nshimiye's avatar Olivier Nshimiye
Browse files

Update the getHideInSettingsInQuietMode to getHideInUiInQuietMode

Bug: 307515481
Test: manual
Change-Id: I75996df11e9276eff5c388b509d630a0d4b3d39f
parent 59709d40
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1267,7 +1267,9 @@ public final class Utils extends com.android.settingslib.Utils {
        for (UserHandle userHandle : profiles) {
            UserProperties userProperties = userManager.getUserProperties(userHandle);
            if (userProperties.getShowInSettings() == UserProperties.SHOW_IN_SETTINGS_SEPARATE) {
                if (Flags.allowPrivateProfile() && userProperties.getHideInSettingsInQuietMode()) {
                if (Flags.allowPrivateProfile()
                        && userProperties.getShowInQuietMode()
                        == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN) {
                    if (!userManager.isQuietModeEnabled(userHandle)) {
                        return true;
                    } else {
+3 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.content.pm.UserProperties;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -312,7 +313,8 @@ public class AccountPreferenceController extends AbstractPreferenceController
                            && !(Flags.allowPrivateProfile() && profile.isPrivateProfile())
                            && (mType & ProfileSelectFragment.ProfileType.PERSONAL) != 0))
                        && !(mUm.getUserProperties(profile.getUserHandle())
                            .getHideInSettingsInQuietMode() && profile.isQuietModeEnabled())) {
                            .getShowInQuietMode() == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN
                            && profile.isQuietModeEnabled())) {
                    updateProfileUi(profile);
                }
            }
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ public class ProfileSelectDialog extends DialogFragment implements UserAdapter.O
    private static boolean shouldHideUserInQuietMode(
            UserHandle userHandle, UserManager userManager) {
        UserProperties userProperties = userManager.getUserProperties(userHandle);
        return userProperties.getHideInSettingsInQuietMode()
        return userProperties.getShowInQuietMode() == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN
                && userManager.isQuietModeEnabled(userHandle);
    }
}