sm7125: fod: 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.

Signed-off-by: Michael Benedict <michaelbt@live.com>
Change-Id: If1ce9cab58717a9b9dcfce496da79bcf74773a33
fourteen-wip
Jesse Chan 4 years ago committed by Simon1511
parent 0f1cb16830
commit 03e297b786
  1. 4
      fod/FingerprintInscreen.cpp

@ -72,6 +72,7 @@ static hidl_vec<int8_t> stringToVec(const std::string& str) {
FingerprintInscreen::FingerprintInscreen() {
mSehBiometricsFingerprintService = ISehBiometricsFingerprint::getService();
set(MASK_BRIGHTNESS_PATH, "319");
set(TSP_CMD_PATH, "fod_enable,1,1,0");
}
void FingerprintInscreen::requestResult(int, const hidl_vec<int8_t>&) {
@ -87,7 +88,6 @@ Return<void> FingerprintInscreen::onFinishEnroll() {
}
Return<void> FingerprintInscreen::onPress() {
set(TSP_CMD_PATH, "fod_enable,1,1,0");
mSehBiometricsFingerprintService->sehRequest(SEM_FINGER_STATE,
SEM_PARAM_PRESSED, stringToVec(SEM_AOSP_FQNAME), FingerprintInscreen::requestResult);
return Void();
@ -96,7 +96,6 @@ Return<void> FingerprintInscreen::onPress() {
Return<void> FingerprintInscreen::onRelease() {
mSehBiometricsFingerprintService->sehRequest(SEM_FINGER_STATE,
SEM_PARAM_RELEASED, stringToVec(SEM_AOSP_FQNAME), FingerprintInscreen::requestResult);
set(TSP_CMD_PATH, "fod_enable,0");
return Void();
}
@ -105,7 +104,6 @@ Return<void> FingerprintInscreen::onShowFODView() {
}
Return<void> FingerprintInscreen::onHideFODView() {
set(TSP_CMD_PATH, "fod_enable,0");
return Void();
}

Loading…
Cancel
Save