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

Commit e13ce669 authored by Irina Dumitrescu's avatar Irina Dumitrescu
Browse files

Do not show work profile encryption notification if already unlocked.

Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
Fixes: 112892128
Change-Id: Ia6be7c2ec6e4724fe59acd32b988c69aefcc3b9c
parent 2c382f07
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -483,6 +483,12 @@ public class LockSettingsService extends ILockSettings.Stub {
            return;
        }

        if (isUserKeyUnlocked(userId)) {
            // If storage is not locked, the user will be automatically unlocked so there is
            // no need to show the notification.
            return;
        }

        final UserHandle userHandle = user.getUserHandle();
        final boolean isSecure = isUserSecure(userId);
        if (isSecure && !mUserManager.isUserUnlockingOrUnlocked(userHandle)) {