Merge "Update the getHideInSettingsInQuietMode to getHideInUiInQuietMode" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
02399366cd
@@ -1209,7 +1209,9 @@ public final class Utils extends com.android.settingslib.Utils {
|
|||||||
for (UserHandle userHandle : profiles) {
|
for (UserHandle userHandle : profiles) {
|
||||||
UserProperties userProperties = userManager.getUserProperties(userHandle);
|
UserProperties userProperties = userManager.getUserProperties(userHandle);
|
||||||
if (userProperties.getShowInSettings() == UserProperties.SHOW_IN_SETTINGS_SEPARATE) {
|
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)) {
|
if (!userManager.isQuietModeEnabled(userHandle)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -42,6 +42,7 @@ import android.content.IntentFilter;
|
|||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.UserInfo;
|
import android.content.pm.UserInfo;
|
||||||
|
import android.content.pm.UserProperties;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -312,7 +313,8 @@ public class AccountPreferenceController extends AbstractPreferenceController
|
|||||||
&& !(Flags.allowPrivateProfile() && profile.isPrivateProfile())
|
&& !(Flags.allowPrivateProfile() && profile.isPrivateProfile())
|
||||||
&& (mType & ProfileSelectFragment.ProfileType.PERSONAL) != 0))
|
&& (mType & ProfileSelectFragment.ProfileType.PERSONAL) != 0))
|
||||||
&& !(mUm.getUserProperties(profile.getUserHandle())
|
&& !(mUm.getUserProperties(profile.getUserHandle())
|
||||||
.getHideInSettingsInQuietMode() && profile.isQuietModeEnabled())) {
|
.getShowInQuietMode() == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN
|
||||||
|
&& profile.isQuietModeEnabled())) {
|
||||||
updateProfileUi(profile);
|
updateProfileUi(profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -235,7 +235,7 @@ public class ProfileSelectDialog extends DialogFragment implements UserAdapter.O
|
|||||||
private static boolean shouldHideUserInQuietMode(
|
private static boolean shouldHideUserInQuietMode(
|
||||||
UserHandle userHandle, UserManager userManager) {
|
UserHandle userHandle, UserManager userManager) {
|
||||||
UserProperties userProperties = userManager.getUserProperties(userHandle);
|
UserProperties userProperties = userManager.getUserProperties(userHandle);
|
||||||
return userProperties.getHideInSettingsInQuietMode()
|
return userProperties.getShowInQuietMode() == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN
|
||||||
&& userManager.isQuietModeEnabled(userHandle);
|
&& userManager.isQuietModeEnabled(userHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user