diff --git a/fod/FingerprintInscreen.cpp b/fod/FingerprintInscreen.cpp index d5b6687f..2b02373c 100644 --- a/fod/FingerprintInscreen.cpp +++ b/fod/FingerprintInscreen.cpp @@ -34,9 +34,6 @@ #define OP_DISPLAY_NOTIFY_PRESS 9 #define OP_DISPLAY_SET_DIM 10 -// This is not a typo by me. It's by OnePlus. -#define HBM_ENABLE_PATH "/sys/class/drm/card0-DSI-1/op_friginer_print_hbm" - namespace vendor { namespace lineage { namespace biometrics { @@ -74,7 +71,6 @@ Return FingerprintInscreen::onStartEnroll() { this->mIsEnrolling = true; this->mVendorFpService->updateStatus(OP_DISABLE_FP_LONGPRESS); this->mVendorFpService->updateStatus(OP_RESUME_FP_ENROLL); - set(HBM_ENABLE_PATH, 1); return Void(); } @@ -82,12 +78,14 @@ Return FingerprintInscreen::onStartEnroll() { Return FingerprintInscreen::onFinishEnroll() { this->mIsEnrolling = false; this->mVendorFpService->updateStatus(OP_FINISH_FP_ENROLL); - set(HBM_ENABLE_PATH, 0); return Void(); } Return FingerprintInscreen::onPress() { + if (mIsEnrolling) { + this->mVendorDisplayService->setMode(OP_DISPLAY_SET_DIM, 1); + } this->mVendorDisplayService->setMode(OP_DISPLAY_NOTIFY_PRESS, 1); return Void(); @@ -145,10 +143,8 @@ Return FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t v Return FingerprintInscreen::handleError(int32_t error, int32_t vendorCode) { switch (error) { case FINGERPRINT_ERROR_CANCELED: - // Turn HBM off after canceled fingerprint enrollment - if (this->mIsEnrolling && vendorCode == 0) { + if (vendorCode == 0) { this->mIsEnrolling = false; - set(HBM_ENABLE_PATH, 0); } return false; case FINGERPRINT_ERROR_VENDOR: