summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java16
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 d552e01..305370d 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;
+ }
}
}
}