Files
hardware_xiaomi/fingerprint/UdfpsExtension.cpp
basamaryan 1c49eb9f6c fingerprint: Move UDFPS handler and extension out of HIDL
Change-Id: Ib78169536cfb3c96b8437dc9b3341837c31c7362
2024-12-25 19:32:26 -05:00

29 lines
576 B
C++

/*
* Copyright (C) 2022-2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <compositionengine/UdfpsExtension.h>
#if __has_include(<display/drm/sde_drm.h>)
#include <display/drm/sde_drm.h>
#elif __has_include(<drm/sde_drm.h>)
#include <drm/sde_drm.h>
#endif
uint32_t getUdfpsDimZOrder(uint32_t z) {
return z;
}
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;
}