a30s: Add surfaceflinger UDFPS extension lib

This commit is contained in:
TheScarastic 2023-10-27 12:48:23 +09:00 committed by roynatech2544
commit 66b69f515f
No known key found for this signature in database
GPG key ID: 389DAC92CAECBBCC
3 changed files with 38 additions and 0 deletions

View file

@ -19,6 +19,7 @@ BOARD_VENDORIMAGE_PARTITION_SIZE := 645922816
TARGET_SEC_FP_REQUEST_TOUCH_EVENT := true
TARGET_SEC_FP_REQUEST_FORCE_CALIBRATE := true
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x2000U | 0x400000000LL
TARGET_SURFACEFLINGER_UDFPS_LIB := //$(DEVICE_PATH):libudfps_extension.a30s
# Inherit common board flags
include device/samsung/universal7885-common/BoardConfigCommon.mk

View file

@ -0,0 +1,7 @@
cc_library_static {
name: "libudfps_extension.a30s",
srcs: ["UdfpsExtension.cpp"],
include_dirs: [
"frameworks/native/services/surfaceflinger/CompositionEngine/include"
],
}

View file

@ -0,0 +1,30 @@
/*
* Copyright (C) 2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <compositionengine/UdfpsExtension.h>
uint32_t getUdfpsZOrder(uint32_t z, bool touched) {
(void)z;
return z;
}
uint64_t getUdfpsUsageBits(uint64_t usageBits, bool touched) {
if (touched) {
usageBits |= 0x400000000LL;
}
return usageBits;
}