diff options
| author | LuK1337 <priv.luk@gmail.com> | 2019-09-22 02:09:05 +0200 |
|---|---|---|
| committer | Ćukasz Patron <priv.luk@gmail.com> | 2019-11-27 15:51:56 +0100 |
| commit | 81317f24fd8839370bcce1ecf47ef18f93f932f5 (patch) | |
| tree | 1613c1e4973176aaac1379f0d3fa7622049f9a18 | |
| parent | eae2c874a66f5b1d1567a260ee0047c7453391d0 (diff) | |
| download | frameworks_base-81317f24fd8839370bcce1ecf47ef18f93f932f5.tar.gz frameworks_base-81317f24fd8839370bcce1ecf47ef18f93f932f5.tar.bz2 frameworks_base-81317f24fd8839370bcce1ecf47ef18f93f932f5.zip | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index d552e012111..305370d5964 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -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,12 +1076,15 @@ public class KeyguardViewMediator extends SystemUI { if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by setting"); return true; } - if (mProfileManager != null) { - Profile profile = mProfileManager.getActiveProfile(); - if (profile != null) { - if (profile.getScreenLockMode().getValue() == Profile.LockMode.DISABLE) { - if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by profile"); - return true; + if (!StorageManager.isFileEncryptedNativeOrEmulated() || + StorageManager.isUserKeyUnlocked(userId)) { + if (mProfileManager != null) { + Profile profile = mProfileManager.getActiveProfile(); + if (profile != null) { + if (profile.getScreenLockMode().getValue() == Profile.LockMode.DISABLE) { + if (DEBUG) Log.d(TAG, "isKeyguardDisabled: keyguard is disabled by profile"); + return true; + } } } } |
