mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 10:35:26 +00:00
Check fm before using it
* Prevent NPE on devices without fingerprint.
This commit is contained in:
parent
8d139e156e
commit
2fe35d578d
@ -30,7 +30,7 @@ public abstract class FingerprintHelper extends FingerprintManager.Authenticatio
|
||||
MagiskManager mm = MagiskManager.get();
|
||||
KeyguardManager km = mm.getSystemService(KeyguardManager.class);
|
||||
FingerprintManager fm = mm.getSystemService(FingerprintManager.class);
|
||||
return km.isKeyguardSecure() && fm.isHardwareDetected() && fm.hasEnrolledFingerprints();
|
||||
return km.isKeyguardSecure() && fm != null && fm.isHardwareDetected() && fm.hasEnrolledFingerprints();
|
||||
}
|
||||
|
||||
protected FingerprintHelper() throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user