diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 7539e48..2745bf3 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -72,10 +72,12 @@ TARGET_ENABLE_MEDIADRM_64 := true TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs # Fingerprint +SOONG_CONFIG_NAMESPACES += XIAOMI_LITO_FINGERPRINT +SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT := FOD +SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT_FOD ?= false ifeq ($(TARGET_HAS_FOD),true) -SOONG_CONFIG_NAMESPACES += XIAOMI_LITO_FOD -SOONG_CONFIG_XIAOMI_LITO_FOD := POS_X POS_Y SIZE -TARGET_SURFACEFLINGER_FOD_LIB := //$(COMMON_PATH):libfod_extension.xiaomi_lito +SOONG_CONFIG_XIAOMI_LITO_FINGERPRINT_FOD := true +TARGET_SURFACEFLINGER_UDFPS_LIB := //$(COMMON_PATH):libudfps_extension.xiaomi_lito endif # FM diff --git a/biometrics/Android.bp b/biometrics/Android.bp index a15eb56..6e77a5d 100644 --- a/biometrics/Android.bp +++ b/biometrics/Android.bp @@ -1,20 +1,43 @@ +soong_config_module_type { + name: "xiaomi_lito_fingerprint_hal_cc_defaults", + module_type: "cc_defaults", + config_namespace: "XIAOMI_LITO_FINGERPRINT", + bool_variables: ["FOD"], + properties: ["cppflags"], +} + +xiaomi_lito_fingerprint_hal_cc_defaults { + name: "xiaomi_lito_fingerprint_hal_defaults", + soong_config_variables: { + FOD: { + cppflags: ["-DFOD"], + }, + }, +} + cc_binary { - name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito", - defaults: ["hidl_defaults"], + name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito", + defaults: [ + "hidl_defaults", + "xiaomi_lito_fingerprint_hal_defaults", + ], relative_install_path: "hw", - init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.rc"], - vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.xml"], + init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.rc"], + vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.xml"], srcs: [ "BiometricsFingerprint.cpp", "service.cpp", ], shared_libs: [ + "libbase", "libcutils", "liblog", "libhidlbase", "libhardware", "libutils", "android.hardware.biometrics.fingerprint@2.1", + "android.hardware.biometrics.fingerprint@2.2", + "android.hardware.biometrics.fingerprint@2.3", "//hardware/xiaomi:vendor.xiaomi.hardware.fingerprintextension@1.0", ], vendor: true, diff --git a/biometrics/BiometricsFingerprint.cpp b/biometrics/BiometricsFingerprint.cpp index 4ed5e26..96f0ebe 100644 --- a/biometrics/BiometricsFingerprint.cpp +++ b/biometrics/BiometricsFingerprint.cpp @@ -14,22 +14,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito" -#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito" +#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito" +#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito" +#include #include #include "xiaomi_fingerprint.h" #include "BiometricsFingerprint.h" #include +#include +#include #include namespace android { namespace hardware { namespace biometrics { namespace fingerprint { -namespace V2_1 { +namespace V2_3 { namespace implementation { // Supported fingerprint HAL version @@ -47,6 +50,31 @@ using RequestStatus = BiometricsFingerprint *BiometricsFingerprint::sInstance = nullptr; +#define COMMAND_NIT 10 +#define PARAM_NIT_FOD 1 +#define PARAM_NIT_NONE 0 + +#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui" + +static bool readBool(int fd) { + char c; + int rc; + + rc = lseek(fd, 0, SEEK_SET); + if (rc) { + LOG(ERROR) << "failed to seek fd, err: " << rc; + return false; + } + + rc = read(fd, &c, sizeof(char)); + if (rc != 1) { + LOG(ERROR) << "failed to read bool from fd, err: " << rc; + return false; + } + + return c != '0'; +} + BiometricsFingerprint::BiometricsFingerprint() : mClientCallback(nullptr), mDevice(nullptr) { sInstance = this; // keep track of the most recent instance for (const auto& class_name : kHALClasses) { @@ -58,6 +86,32 @@ BiometricsFingerprint::BiometricsFingerprint() : mClientCallback(nullptr), mDevi break; } } + +#ifdef FOD + std::thread([this]() { + int fd = open(FOD_UI_PATH, O_RDONLY); + if (fd < 0) { + LOG(ERROR) << "failed to open fd, err: " << fd; + return; + } + + struct pollfd fodUiPoll = { + .fd = fd, + .events = POLLERR | POLLPRI, + .revents = 0, + }; + + while (true) { + int rc = poll(&fodUiPoll, 1, -1); + if (rc < 0) { + LOG(ERROR) << "failed to poll fd, err: " << rc; + continue; + } + + extCmd(COMMAND_NIT, readBool(fd) ? PARAM_NIT_FOD : PARAM_NIT_NONE); + } + }).detach(); +#endif } BiometricsFingerprint::~BiometricsFingerprint() { @@ -369,13 +423,30 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) { } } +Return BiometricsFingerprint::isUdfps(uint32_t /*sensorId*/) { +#if FOD + return true; +#else + return false; +#endif +} + +Return BiometricsFingerprint::onFingerDown(uint32_t /*x*/, uint32_t /*y*/, + float /*minor*/, float /*major*/) { + return Void(); +} + +Return BiometricsFingerprint::onFingerUp() { + return Void(); +} + Return BiometricsFingerprint::extCmd(int32_t cmd, int32_t param) { return mDevice->extCmd(mDevice, cmd, param); } } // namespace implementation -} // namespace V2_1 +} // namespace V2_3 } // namespace fingerprint } // namespace biometrics } // namespace hardware -} // namespace android +} // namespace android \ No newline at end of file diff --git a/biometrics/BiometricsFingerprint.h b/biometrics/BiometricsFingerprint.h index 84e3080..b5e91c5 100644 --- a/biometrics/BiometricsFingerprint.h +++ b/biometrics/BiometricsFingerprint.h @@ -15,25 +15,27 @@ * limitations under the License. */ -#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H -#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H +#ifndef ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H +#define ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H #include #include #include "xiaomi_fingerprint.h" #include #include -#include +#include #include namespace android { namespace hardware { namespace biometrics { namespace fingerprint { -namespace V2_1 { +namespace V2_3 { namespace implementation { -using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint; +using ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint; +using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo; +using ::android::hardware::biometrics::fingerprint::V2_1::FingerprintError; using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback; using ::android::hardware::biometrics::fingerprint::V2_1::RequestStatus; using ::android::hardware::Return; @@ -64,6 +66,11 @@ public: Return setActiveGroup(uint32_t gid, const hidl_string& storePath) override; Return authenticate(uint64_t operationId, uint32_t gid) override; + // Methods from ::android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint follow. + Return isUdfps(uint32_t sensorId) override; + Return onFingerDown(uint32_t x, uint32_t y, float minor, float major) override; + Return onFingerUp() override; + // Methods from ::vendor::xiaomi::hardware::fingerprintextension::V1_0::IXiaomiFingerprint follow. Return extCmd(int32_t cmd, int32_t param) override; @@ -81,10 +88,10 @@ private: }; } // namespace implementation -} // namespace V2_1 +} // namespace V2_3 } // namespace fingerprint } // namespace biometrics } // namespace hardware } // namespace android -#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_1_BIOMETRICSFINGERPRINT_H +#endif // ANDROID_HARDWARE_BIOMETRICS_FINGERPRINT_V2_3_BIOMETRICSFINGERPRINT_H diff --git a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.rc b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.rc similarity index 93% rename from biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.rc rename to biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.rc index dad0f7b..be40f68 100644 --- a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.rc +++ b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.rc @@ -1,4 +1,4 @@ -service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito +service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito # "class hal" causes a race condition on some devices due to files created # in /data. As a workaround, postpone startup until later in boot once # /data is mounted. @@ -42,6 +42,9 @@ on boot chmod 0744 /sys/class/drm/card0-DSI-1/panel_info chmod 0666 /dev/input/event2 + chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui + chmod 0444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui + on post-fs-data mkdir /data/vendor/fpc 0770 system system mkdir /data/vendor/goodix 0770 system system diff --git a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.xml b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.xml similarity index 95% rename from biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.xml rename to biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.xml index 93709fd..c54524a 100644 --- a/biometrics/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito.xml +++ b/biometrics/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito.xml @@ -2,7 +2,7 @@ android.hardware.biometrics.fingerprint hwbinder - 2.1 + 2.3 IBiometricsFingerprint default diff --git a/biometrics/service.cpp b/biometrics/service.cpp index 3a2fee5..e88178e 100644 --- a/biometrics/service.cpp +++ b/biometrics/service.cpp @@ -14,18 +14,18 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito" +#define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito" #include #include #include -#include -#include +#include +#include #include #include "BiometricsFingerprint.h" -using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint; -using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint; +using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint; +using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint; using android::hardware::configureRpcThreadpool; using android::hardware::joinRpcThreadpool; using android::sp; diff --git a/fod/Android.bp b/fod/Android.bp index 9ea1934..e4be52d 100644 --- a/fod/Android.bp +++ b/fod/Android.bp @@ -4,56 +4,9 @@ // SPDX-License-Identifier: Apache-2.0 // -soong_config_module_type { - name: "xiaomi_lito_fod_hal_cc_defaults", - module_type: "cc_defaults", - config_namespace: "XIAOMI_LITO_FOD", - value_variables: ["POS_X", "POS_Y", "SIZE"], - properties: ["cppflags"], -} - -xiaomi_lito_fod_hal_cc_defaults { - name: "xiaomi_lito_fod_hal_defaults", - soong_config_variables: { - POS_X: { - cppflags: ["-DFOD_POS_X=%s"], - }, - POS_Y: { - cppflags: ["-DFOD_POS_Y=%s"], - }, - SIZE: { - cppflags: ["-DFOD_SIZE=%s"], - }, - }, -} - -cc_binary { - name: "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito", - defaults: [ - "hidl_defaults", - "xiaomi_lito_fod_hal_defaults", - ], - relative_install_path: "hw", - init_rc: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.rc"], - vintf_fragments: ["vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.xml"], - srcs: ["service.cpp", "FingerprintInscreen.cpp"], - shared_libs: [ - "libbase", - "libhardware", - "libhardware_legacy", - "libhidlbase", - "liblog", - "libutils", - "vendor.lineage.biometrics.fingerprint.inscreen@1.0", - "//hardware/xiaomi:vendor.goodix.hardware.biometrics.fingerprint@2.1", - "//hardware/xiaomi:vendor.xiaomi.hardware.fingerprintextension@1.0", - ], - vendor: true, -} - cc_library_static { - name: "libfod_extension.xiaomi_lito", - srcs: ["FodExtension.cpp"], + name: "libudfps_extension.xiaomi_lito", + srcs: ["UdfpsExtension.cpp"], include_dirs: [ "frameworks/native/services/surfaceflinger/CompositionEngine/include" ], diff --git a/fod/FingerprintInscreen.cpp b/fod/FingerprintInscreen.cpp deleted file mode 100644 index b6f3037..0000000 --- a/fod/FingerprintInscreen.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2019-2021 The LineageOS Project - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define LOG_TAG "FingerprintInscreenService" - -#include "FingerprintInscreen.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#define COMMAND_NIT 10 -#define PARAM_NIT_FOD 1 -#define PARAM_NIT_NONE 0 - -#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui" - -namespace vendor { -namespace lineage { -namespace biometrics { -namespace fingerprint { -namespace inscreen { -namespace V1_0 { -namespace implementation { - -static bool readBool(int fd) { - char c; - int rc; - - rc = lseek(fd, 0, SEEK_SET); - if (rc) { - LOG(ERROR) << "failed to seek fd, err: " << rc; - return false; - } - - rc = read(fd, &c, sizeof(char)); - if (rc != 1) { - LOG(ERROR) << "failed to read bool from fd, err: " << rc; - return false; - } - - return c != '0'; -} - -FingerprintInscreen::FingerprintInscreen() { - mXiaomiFingerprintService = IXiaomiFingerprint::getService(); - - std::thread([this]() { - int fd = open(FOD_UI_PATH, O_RDONLY); - if (fd < 0) { - LOG(ERROR) << "failed to open fd, err: " << fd; - return; - } - - struct pollfd fodUiPoll = { - .fd = fd, - .events = POLLERR | POLLPRI, - .revents = 0, - }; - - while (true) { - int rc = poll(&fodUiPoll, 1, -1); - if (rc < 0) { - LOG(ERROR) << "failed to poll fd, err: " << rc; - continue; - } - - mXiaomiFingerprintService->extCmd(COMMAND_NIT, - readBool(fd) ? PARAM_NIT_FOD : PARAM_NIT_NONE); - } - }).detach(); -} - -Return FingerprintInscreen::onStartEnroll() { - return Void(); -} - -Return FingerprintInscreen::onFinishEnroll() { - return Void(); -} - -Return FingerprintInscreen::onPress() { - return Void(); -} - -Return FingerprintInscreen::onRelease() { - return Void(); -} - -Return FingerprintInscreen::onShowFODView() { - return Void(); -} - -Return FingerprintInscreen::onHideFODView() { - return Void(); -} - -Return FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) { - LOG(ERROR) << "acquiredInfo: " << acquiredInfo << ", vendorCode: " << vendorCode; - return false; -} - -Return FingerprintInscreen::handleError(int32_t error, int32_t vendorCode) { - LOG(ERROR) << "error: " << error << ", vendorCode: " << vendorCode; - return false; -} - -Return FingerprintInscreen::setLongPressEnabled(bool) { - return Void(); -} - -Return FingerprintInscreen::getDimAmount(int32_t /* brightness */) { - return 0; -} - -Return FingerprintInscreen::shouldBoostBrightness() { - return false; -} - -Return FingerprintInscreen::setCallback(const sp& /* callback */) { - return Void(); -} - -Return FingerprintInscreen::getPositionX() { - return FOD_POS_X; -} - -Return FingerprintInscreen::getPositionY() { - return FOD_POS_Y; -} - -Return FingerprintInscreen::getSize() { - return FOD_SIZE; -} - -} // namespace implementation -} // namespace V1_0 -} // namespace inscreen -} // namespace fingerprint -} // namespace biometrics -} // namespace lineage -} // namespace vendor diff --git a/fod/FingerprintInscreen.h b/fod/FingerprintInscreen.h deleted file mode 100644 index d796434..0000000 --- a/fod/FingerprintInscreen.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2019-2021 The LineageOS Project - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#ifndef VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H -#define VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H - -#include -#include - -namespace vendor { -namespace lineage { -namespace biometrics { -namespace fingerprint { -namespace inscreen { -namespace V1_0 { -namespace implementation { - -using ::android::sp; -using ::android::hardware::Return; -using ::android::hardware::Void; -using ::vendor::xiaomi::hardware::fingerprintextension::V1_0::IXiaomiFingerprint; - -class FingerprintInscreen : public IFingerprintInscreen { - public: - FingerprintInscreen(); - - Return onStartEnroll() override; - Return onFinishEnroll() override; - Return onPress() override; - Return onRelease() override; - Return onShowFODView() override; - Return onHideFODView() override; - Return handleAcquired(int32_t acquiredInfo, int32_t vendorCode) override; - Return handleError(int32_t error, int32_t vendorCode) override; - Return setLongPressEnabled(bool enabled) override; - Return getDimAmount(int32_t cur_brightness) override; - Return shouldBoostBrightness() override; - Return setCallback(const sp& callback) override; - Return getPositionX() override; - Return getPositionY() override; - Return getSize() override; - - private: - sp mXiaomiFingerprintService; -}; - -} // namespace implementation -} // namespace V1_0 -} // namespace inscreen -} // namespace fingerprint -} // namespace biometrics -} // namespace lineage -} // namespace vendor - -#endif // VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H diff --git a/fod/FodExtension.cpp b/fod/UdfpsExtension.cpp similarity index 59% rename from fod/FodExtension.cpp rename to fod/UdfpsExtension.cpp index ad1df9e..547c300 100644 --- a/fod/FodExtension.cpp +++ b/fod/UdfpsExtension.cpp @@ -4,16 +4,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include -uint32_t getFodZOrder(uint32_t z, bool touched) { +uint32_t getUdfpsZOrder(uint32_t z, bool touched) { if (touched) { z |= FOD_PRESSED_LAYER_ZORDER; } return z; } -uint64_t getFodUsageBits(uint64_t usageBits, bool) { +uint64_t getUdfpsUsageBits(uint64_t usageBits, bool) { return usageBits; } diff --git a/fod/service.cpp b/fod/service.cpp deleted file mode 100644 index 67acf16..0000000 --- a/fod/service.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2019-2021 The LineageOS Project - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#define LOG_TAG "vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito" - -#include -#include - -#include "FingerprintInscreen.h" - -using android::hardware::configureRpcThreadpool; -using android::hardware::joinRpcThreadpool; - -using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen; -using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen; - -using android::OK; -using android::status_t; - -int main() { - android::sp service = new FingerprintInscreen(); - - configureRpcThreadpool(1, true); - - status_t status = service->registerAsService(); - if (status != OK) { - LOG(ERROR) << "Cannot register FOD HAL service."; - return 1; - } - - LOG(INFO) << "FOD HAL service ready."; - - joinRpcThreadpool(); - - LOG(ERROR) << "FOD HAL service failed to join thread pool."; - return 1; -} diff --git a/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.rc b/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.rc deleted file mode 100644 index 9396a35..0000000 --- a/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.rc +++ /dev/null @@ -1,10 +0,0 @@ -on boot - chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui - chmod 0444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui - -service vendor.fingerprint-inscreen-1-0 /vendor/bin/hw/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito - interface vendor.lineage.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default - class hal - user system - group system - shutdown critical diff --git a/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.xml b/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.xml deleted file mode 100644 index a34f921..0000000 --- a/fod/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - vendor.goodix.hardware.biometrics.fingerprint - hwbinder - 2.1 - - IGoodixFingerprintDaemon - default - - - - vendor.lineage.biometrics.fingerprint.inscreen - hwbinder - 1.0 - - IFingerprintInscreen - default - - - diff --git a/lito.mk b/lito.mk index c8eba01..569965b 100644 --- a/lito.mk +++ b/lito.mk @@ -203,21 +203,15 @@ PRODUCT_PACKAGES += \ # Fingerprint ifeq ($(TARGET_HAS_FOD),true) -PRODUCT_PACKAGES += \ - vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_lito - PRODUCT_PACKAGES += \ vendor.goodix.hardware.biometrics.fingerprint@2.1.vendor PRODUCT_PACKAGES += \ KeyHandler - -PRODUCT_COPY_FILES += \ - vendor/lineage/config/permissions/vendor.lineage.biometrics.fingerprint.inscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/vendor.lineage.biometrics.fingerprint.inscreen.xml endif PRODUCT_PACKAGES += \ - android.hardware.biometrics.fingerprint@2.1-service.xiaomi_lito + android.hardware.biometrics.fingerprint@2.3-service.xiaomi_lito PRODUCT_PACKAGES += \ vendor.xiaomi.hardware.fingerprintextension@1.0.vendor diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index e050d41..c6ecc0f 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -27,8 +27,7 @@ /dev/mius(.*)? u:object_r:ultrasound_device:s0 # Fingerprint -/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2.1-service\.xiaomi_lito u:object_r:hal_fingerprint_default_exec:s0 -/vendor/bin/hw/vendor\.lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.xiaomi_lito u:object_r:hal_lineage_fod_lito_exec:s0 +/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2.3-service\.xiaomi_lito u:object_r:hal_fingerprint_default_exec:s0 # Fingerprint - devices /dev/goodix_fp u:object_r:fingerprint_device:s0 diff --git a/sepolicy/vendor/hal_lineage_fod_lito.te b/sepolicy/vendor/hal_lineage_fod_lito.te deleted file mode 100644 index 8dbe297..0000000 --- a/sepolicy/vendor/hal_lineage_fod_lito.te +++ /dev/null @@ -1,14 +0,0 @@ -type hal_lineage_fod_lito, domain; -hal_server_domain(hal_lineage_fod_lito, hal_lineage_fod) - -type hal_lineage_fod_lito_exec, exec_type, vendor_file_type, file_type; -init_daemon_domain(hal_lineage_fod_lito) - -# Allow access to the HALs -hal_client_domain(hal_lineage_fod_lito, hal_fingerprint) - -# Allow binder communication with hal_fingerprint_lito -binder_call(hal_lineage_fod_lito, hal_fingerprint_default) - -allow hal_lineage_fod_lito vendor_sysfs_graphics:dir r_dir_perms; -allow hal_lineage_fod_lito vendor_sysfs_graphics:file rw_file_perms;