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

Commit b528b26e authored by Jim Miller's avatar Jim Miller
Browse files

Fix crash on devices without fingerprint feature.

Fixes bug 26877020

Change-Id: Ibee4d956beb0ce9af35f01857370c1378ef5594a
parent 446b78cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
            // Fingerprint
            FingerprintManager fpm =
                    (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
            if (fpm.isHardwareDetected()) {
            if (fpm != null && fpm.isHardwareDetected()) {
                // This catches the title which can be overloaded in an overlay
                data = new SearchIndexableRaw(context);
                data.title = res.getString(R.string.security_settings_fingerprint_preference_title);
+1 −1
Original line number Diff line number Diff line
@@ -802,7 +802,7 @@ public class FingerprintSettings extends SubSettings {
    public static Preference getFingerprintPreferenceForUser(Context context, int userId) {
        FingerprintManager fpm = (FingerprintManager) context.getSystemService(
                Context.FINGERPRINT_SERVICE);
        if (!fpm.isHardwareDetected()) {
        if (fpm == null || !fpm.isHardwareDetected()) {
            Log.v(TAG, "No fingerprint hardware detected!!");
            return null;
        }