hidl: biometrics: fingerprint: Add surfaceflinger extension lib

Change-Id: I51fb56c0a20e3cac83afb46ed6a6e2f967159d18
This commit is contained in:
Abhishek Aggarwal 2022-03-02 10:55:40 +07:00 committed by Sebastiano Barezzi
parent cd3f74f3d0
commit 06a86b7809
No known key found for this signature in database
GPG Key ID: 47760583F393BC44
2 changed files with 30 additions and 0 deletions
hidl/biometrics/fingerprint

View File

@ -38,3 +38,14 @@ cc_library_headers {
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",
],
}

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2022 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <compositionengine/UdfpsExtension.h>
#include <drm/sde_drm.h>
uint32_t getUdfpsZOrder(uint32_t z, bool touched) {
if (touched) {
z |= FOD_PRESSED_LAYER_ZORDER;
}
return z;
}
uint64_t getUdfpsUsageBits(uint64_t usageBits, bool /* touched */) {
return usageBits;
}