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

Commit 2923b4eb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't access fingerprint service when unavailable"

parents 2126a326 3e8964d4
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.app.admin.DevicePolicyManager;
import android.app.trust.ITrustManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.biometrics.BiometricConstants;
@@ -809,13 +810,14 @@ public class BiometricService extends SystemService {

        public List<FingerprintSensorPropertiesInternal> getFingerprintSensorProperties(
                Context context) {
            if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
                final FingerprintManager fpm = context.getSystemService(FingerprintManager.class);
                if (fpm != null) {
                    return fpm.getSensorPropertiesInternal();
            } else {
                return new ArrayList<>();
                }
            }
            return new ArrayList<>();
        }
    }

    /**