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

Commit 81317f24 authored by LuK1337's avatar LuK1337 Committed by Łukasz Patron
Browse files

SystemUI: Don't dismiss keyguard if user key isn't unlocked

* This change avoids skipping keyguard before
  userdata is decrypted on FBE devices if user
  made their profile so that it keeps their
  device unlocked.

Change-Id: If470d07e8d0188535a9e6a77f96f0a66ff4e434d
parent eae2c874
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -1075,6 +1076,8 @@ public class KeyguardViewMediator extends SystemUI {
            if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by setting");
            return true;
        }
        if (!StorageManager.isFileEncryptedNativeOrEmulated() ||
                StorageManager.isUserKeyUnlocked(userId)) {
            if (mProfileManager != null) {
                Profile profile = mProfileManager.getActiveProfile();
                if (profile != null) {
@@ -1084,6 +1087,7 @@ public class KeyguardViewMediator extends SystemUI {
                    }
                }
            }
        }
        return false;
    }