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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user