forked from donjohanliebert/hardware_xiaomi
hidl: biometrics: fingerprint: Add surfaceflinger extension lib
Change-Id: I51fb56c0a20e3cac83afb46ed6a6e2f967159d18
This commit is contained in:
parent
cd3f74f3d0
commit
06a86b7809
hidl/biometrics/fingerprint
@ -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",
|
||||
],
|
||||
}
|
||||
|
19
hidl/biometrics/fingerprint/UdfpsExtension.cpp
Normal file
19
hidl/biometrics/fingerprint/UdfpsExtension.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user