diff --git a/app/src/main/java/eu/faircode/netguard/ActivityMain.java b/app/src/main/java/eu/faircode/netguard/ActivityMain.java index 64bd1d08..7aa9331d 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityMain.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityMain.java @@ -115,7 +115,11 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences KeyguardManager kgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE); Intent intent = kgm.createConfirmDeviceCredentialIntent("NetGuard", null); - if (unlocked || !prefs.getBoolean("credentials", false) || !kgm.isKeyguardSecure() || intent == null) + if (unlocked || + !prefs.getBoolean("credentials", false) || + !kgm.isKeyguardSecure() || + kgm.isKeyguardLocked() || + intent == null) unlocked = true; else startActivityForResult(intent, REQUEST_KEYGUARD);