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

Commit 59f3c097 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Fix possible NPE in FingerprintManager.

There's an unsafe use of a @Nullable reference in FingerprintManager.
Add null check.

Bug: 254465749
Test: Manually confirm device doesn't crash during boot.
Change-Id: I26da2e9a2af06e110367fc6f1127df4fddbcc678
parent 298b0732
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1080,7 +1080,7 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
     */
    public boolean isPowerbuttonFps() {
        final FingerprintSensorPropertiesInternal sensorProps = getFirstFingerprintSensor();
        return sensorProps.sensorType == TYPE_POWER_BUTTON;
        return sensorProps == null ? false : sensorProps.sensorType == TYPE_POWER_BUTTON;
    }

    /**