SUW: Fix crash on fingerprint capability check
* Check if the device supports the fingerprint feature before proceeding Change-Id: I9cda52500c1e45499b5647fccff3d7d37c8311ef
This commit is contained in:
committed by
Abhisek Devkota
parent
c83309e963
commit
709054b0dd
@@ -225,9 +225,14 @@ public class SetupWizardUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasFingerprint(Context context) {
|
public static boolean hasFingerprint(Context context) {
|
||||||
FingerprintManager fingerprintManager = (FingerprintManager)
|
PackageManager packageManager = context.getPackageManager();
|
||||||
context.getSystemService(Context.FINGERPRINT_SERVICE);
|
if (packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
|
||||||
return fingerprintManager.isHardwareDetected();
|
FingerprintManager fingerprintManager = (FingerprintManager)
|
||||||
|
context.getSystemService(Context.FINGERPRINT_SERVICE);
|
||||||
|
return fingerprintManager.isHardwareDetected();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean simMissing() {
|
public static boolean simMissing() {
|
||||||
|
Reference in New Issue
Block a user