fingerprint: inscreen: enable FOD in TSP in initialization

Samsung enables FOD in TS driver (fod_enable) at all times except
a small number of optical FOD sensor that doesn't have BiometricFeature
.FEATURE_SUPPORT_AOD. As optical type sensor support is not implemented
currently, this HAL is only used on device that has FOD always-on.

This change follows behavior of stock firmware and without toggling of
FOD enable state FOD should be more stable.

Plus it allows setInteractive and config_powerDecoupleInteractiveModeFromDisplay
to function properly with FOD. Currently setInteractive(0) happens before
a onShowFODView (which is the current point to call fod_enable) can be
triggered by the Doze, as TS driver only handles command when it is enabled,
FOD doesn't work when there is a setInteractive(0) that disables TS.

Change-Id: I22291cc62d81ffdaa5edd3f684f9788b0c0650c2
tirimbino
Jesse Chan 5 years ago committed by Jan Altensen
parent 3b4d392992
commit ec166e56e2
  1. 11
      hidl/fingerprint/inscreen/FingerprintInscreen.cpp

@ -78,6 +78,7 @@ FingerprintInscreen::FingerprintInscreen() {
#ifdef FOD_SET_RECT
set(TSP_CMD_PATH, FOD_SET_RECT);
#endif
set(TSP_CMD_PATH, FOD_ENABLE);
}
Return<void> FingerprintInscreen::onStartEnroll() { return Void(); }
@ -88,15 +89,9 @@ Return<void> FingerprintInscreen::onPress() { return Void(); }
Return<void> FingerprintInscreen::onRelease() { return Void(); }
Return<void> FingerprintInscreen::onShowFODView() {
set(TSP_CMD_PATH, FOD_ENABLE);
return Void();
}
Return<void> FingerprintInscreen::onShowFODView() { return Void(); }
Return<void> FingerprintInscreen::onHideFODView() {
set(TSP_CMD_PATH, FOD_DISABLE);
return Void();
}
Return<void> FingerprintInscreen::onHideFODView() { return Void(); }
Return<bool> FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) {
std::lock_guard<std::mutex> _lock(mCallbackLock);

Loading…
Cancel
Save