fingerprint: allow to request force calibration

* Helps with the now rare enrollment calibration errors we get
  and also with fingerprint enrollment after enrolling a fingerprint
  in DSU (without this it constantly fails with calibration error after that)

[Linux4: Pass 1 as parameter and unconditionally call it]

Change-Id: Idde4a4b06efc279d227ab2e3b4056ed8855dbf8f
urubino
Jesse Chan 4 years ago committed by Tim Zimmermann
parent d88d29a438
commit f9eb47822a
No known key found for this signature in database
GPG Key ID: 6DC21A63F819C5EF
  1. 4
      hidl/fingerprint/Android.mk
  2. 4
      hidl/fingerprint/BiometricsFingerprint.cpp

@ -48,6 +48,10 @@ ifeq ($(TARGET_SEC_FP_HAS_FINGERPRINT_GESTURES),true)
LOCAL_CFLAGS += -DHAS_FINGERPRINT_GESTURES
endif
ifeq ($(TARGET_SEC_FP_REQUEST_FORCE_CALIBRATE),true)
LOCAL_CFLAGS += -DREQUEST_FORCE_CALIBRATE
endif
LOCAL_MODULE := android.hardware.biometrics.fingerprint@2.3-service.samsung
LOCAL_INIT_RC := android.hardware.biometrics.fingerprint@2.3-service.samsung.rc
LOCAL_VINTF_FRAGMENTS := android.hardware.biometrics.fingerprint@2.3-service.samsung.xml

@ -219,6 +219,10 @@ Return<RequestStatus> BiometricsFingerprint::enroll(const hidl_array<uint8_t, 69
uint32_t gid, uint32_t timeoutSec) {
const hw_auth_token_t* authToken = reinterpret_cast<const hw_auth_token_t*>(hat.data());
#ifdef REQUEST_FORCE_CALIBRATE
request(SEM_REQUEST_FORCE_CBGE, 1);
#endif
return ErrorFilter(ss_fingerprint_enroll(authToken, gid, timeoutSec));
}

Loading…
Cancel
Save