From 54166cb529b504f6a5ec5afc1b7fb1bd8de743c5 Mon Sep 17 00:00:00 2001 From: basamaryan Date: Wed, 9 Oct 2024 19:59:21 -0400 Subject: [PATCH] fingerprint: Move UDFPS handler and extension out of HIDL Change-Id: Ib78169536cfb3c96b8437dc9b3341837c31c7362 --- fingerprint/Android.bp | 31 +++++++++++++++++++ .../UdfpsExtension.cpp | 0 .../UdfpsHandler.cpp | 0 .../include/UdfpsHandler.h | 0 .../include/fingerprint.h | 0 hidl/biometrics/fingerprint/Android.bp | 24 +++----------- 6 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 fingerprint/Android.bp rename {hidl/biometrics/fingerprint => fingerprint}/UdfpsExtension.cpp (100%) rename {hidl/biometrics/fingerprint => fingerprint}/UdfpsHandler.cpp (100%) rename {hidl/biometrics/fingerprint => fingerprint}/include/UdfpsHandler.h (100%) rename {hidl/biometrics/fingerprint => fingerprint}/include/fingerprint.h (100%) diff --git a/fingerprint/Android.bp b/fingerprint/Android.bp new file mode 100644 index 0000000..6a8a858 --- /dev/null +++ b/fingerprint/Android.bp @@ -0,0 +1,31 @@ +// +// Copyright (C) 2022-2024 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +cc_library_static { + name: "libudfpshandlerfactory", + srcs: ["UdfpsHandler.cpp"], + vendor: true, + header_libs: ["xiaomifingerprint_headers"], +} + +cc_library_headers { + name: "xiaomifingerprint_headers", + export_include_dirs: ["include"], + vendor: true, + header_libs: ["libhardware_headers"], + export_header_lib_headers: ["libhardware_headers"], +} + +cc_library_static { + name: "libudfps_extension.xiaomi", + srcs: ["UdfpsExtension.cpp"], + include_dirs: [ + "frameworks/native/services/surfaceflinger/CompositionEngine/include", + ], + header_libs: [ + "generated_kernel_headers", + ], +} diff --git a/hidl/biometrics/fingerprint/UdfpsExtension.cpp b/fingerprint/UdfpsExtension.cpp similarity index 100% rename from hidl/biometrics/fingerprint/UdfpsExtension.cpp rename to fingerprint/UdfpsExtension.cpp diff --git a/hidl/biometrics/fingerprint/UdfpsHandler.cpp b/fingerprint/UdfpsHandler.cpp similarity index 100% rename from hidl/biometrics/fingerprint/UdfpsHandler.cpp rename to fingerprint/UdfpsHandler.cpp diff --git a/hidl/biometrics/fingerprint/include/UdfpsHandler.h b/fingerprint/include/UdfpsHandler.h similarity index 100% rename from hidl/biometrics/fingerprint/include/UdfpsHandler.h rename to fingerprint/include/UdfpsHandler.h diff --git a/hidl/biometrics/fingerprint/include/fingerprint.h b/fingerprint/include/fingerprint.h similarity index 100% rename from hidl/biometrics/fingerprint/include/fingerprint.h rename to fingerprint/include/fingerprint.h diff --git a/hidl/biometrics/fingerprint/Android.bp b/hidl/biometrics/fingerprint/Android.bp index 2cae698..8beeb5c 100644 --- a/hidl/biometrics/fingerprint/Android.bp +++ b/hidl/biometrics/fingerprint/Android.bp @@ -14,7 +14,6 @@ cc_binary { relative_install_path: "hw", srcs: [ "BiometricsFingerprint.cpp", - "UdfpsHandler.cpp", "service.cpp", ], @@ -31,24 +30,9 @@ cc_binary { "android.hardware.biometrics.fingerprint@2.3", ], + static_libs: [ + "libudfpshandlerfactory", + ], + header_libs: ["xiaomifingerprint_headers"], } - -cc_library_headers { - name: "xiaomifingerprint_headers", - export_include_dirs: ["include"], - vendor: true, - header_libs: ["libhardware_headers"], - export_header_lib_headers: ["libhardware_headers"], -} - -cc_library_static { - name: "libudfps_extension.xiaomi", - srcs: ["UdfpsExtension.cpp"], - include_dirs: [ - "frameworks/native/services/surfaceflinger/CompositionEngine/include" - ], - header_libs: [ - "generated_kernel_headers", - ], -}