Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 709054b0 authored by Michael Bestas's avatar Michael Bestas Committed by Abhisek Devkota
Browse files

SUW: Fix crash on fingerprint capability check

* Check if the device supports the fingerprint feature before proceeding

Change-Id: I9cda52500c1e45499b5647fccff3d7d37c8311ef
parent c83309e9
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -225,9 +225,14 @@ public class SetupWizardUtils {
    }

    public static boolean hasFingerprint(Context context) {
        PackageManager packageManager = context.getPackageManager();
        if (packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
            FingerprintManager fingerprintManager = (FingerprintManager)
                    context.getSystemService(Context.FINGERPRINT_SERVICE);
            return fingerprintManager.isHardwareDetected();
        } else {
            return false;
        }
    }

    public static boolean simMissing() {