mirror of https://github.com/M66B/NetGuard.git
parent
3fffd41032
commit
22ddb3b92e
|
@ -115,7 +115,11 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
||||||
|
|
||||||
KeyguardManager kgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
|
KeyguardManager kgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
Intent intent = kgm.createConfirmDeviceCredentialIntent("NetGuard", null);
|
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;
|
unlocked = true;
|
||||||
else
|
else
|
||||||
startActivityForResult(intent, REQUEST_KEYGUARD);
|
startActivityForResult(intent, REQUEST_KEYGUARD);
|
||||||
|
|
Loading…
Reference in New Issue