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

Commit d0ad7f6b authored by LuK1337's avatar LuK1337 Committed by Luca Stefani
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 a2d8925e
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;
@@ -1052,6 +1053,8 @@ public class KeyguardViewMediator extends SystemUI {
            if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by setting");
            if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by setting");
            return true;
            return true;
        }
        }
        if (!StorageManager.isFileEncryptedNativeOrEmulated() ||
                StorageManager.isUserKeyUnlocked(userId)) {
            if (mProfileManager != null) {
            if (mProfileManager != null) {
                Profile profile = mProfileManager.getActiveProfile();
                Profile profile = mProfileManager.getActiveProfile();
                if (profile != null) {
                if (profile != null) {
@@ -1061,6 +1064,7 @@ public class KeyguardViewMediator extends SystemUI {
                    }
                    }
                }
                }
            }
            }
        }
        return false;
        return false;
    }
    }