dubai: Add UDFPS extension library

* Mark the pressed fingerprint layer.

Change-Id: I49891f89350839ff93ff1a762a83996bfd56ec18
This commit is contained in:
Cosmin Tanislav
2022-02-10 22:04:32 +02:00
committed by Marc Bourgoin
parent e96c195166
commit 7e37c47aff
3 changed files with 33 additions and 0 deletions

View File

@@ -19,3 +19,14 @@ cc_binary {
"android.hardware.biometrics.fingerprint@2.3",
],
}
cc_library_static {
name: "libudfps_extension.dubai",
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 <display/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) {
return usageBits;
}