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

Commit 12e4b331 authored by Benjamin Franz's avatar Benjamin Franz Committed by android-build-merger
Browse files

Merge "Don\'t show the unlock notification when Work mode is off" into nyc-dev

am: 23abc598

* commit '23abc598':
  Don't show the unlock notification when Work mode is off

Change-Id: I7da82038f231d5217a9544a0e64718a0284aa0a5
parents f1320d1d 23abc598
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -261,7 +261,9 @@ public class LockSettingsService extends ILockSettings.Stub {
                    showEncryptionNotification(userHandle);
                    showEncryptionNotification(userHandle);
                } else {
                } else {
                    UserInfo parent = mUserManager.getProfileParent(user.id);
                    UserInfo parent = mUserManager.getProfileParent(user.id);
                    if (parent != null && mUserManager.isUserUnlocked(parent.getUserHandle())) {
                    if (parent != null &&
                            mUserManager.isUserUnlocked(parent.getUserHandle()) &&
                            !mUserManager.isQuietModeEnabled(userHandle)) {
                        // Only show notifications for managed profiles once their parent
                        // Only show notifications for managed profiles once their parent
                        // user is unlocked.
                        // user is unlocked.
                        showEncryptionNotificationForProfile(userHandle);
                        showEncryptionNotificationForProfile(userHandle);
@@ -348,7 +350,8 @@ public class LockSettingsService extends ILockSettings.Stub {
            UserInfo profile = profiles.get(i);
            UserInfo profile = profiles.get(i);
            if (profile.isManagedProfile()) {
            if (profile.isManagedProfile()) {
                UserHandle userHandle = profile.getUserHandle();
                UserHandle userHandle = profile.getUserHandle();
                if (!mUserManager.isUserUnlocked(userHandle)) {
                if (!mUserManager.isUserUnlocked(userHandle) &&
                        !mUserManager.isQuietModeEnabled(userHandle)) {
                    showEncryptionNotificationForProfile(userHandle);
                    showEncryptionNotificationForProfile(userHandle);
                }
                }
            }
            }