diff --git a/a30s/BoardConfig.mk b/a30s/BoardConfig.mk index 05d3c07..012cdad 100644 --- a/a30s/BoardConfig.mk +++ b/a30s/BoardConfig.mk @@ -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 diff --git a/a30s/fingerprint/Android.bp b/a30s/fingerprint/Android.bp new file mode 100644 index 0000000..a6b8618 --- /dev/null +++ b/a30s/fingerprint/Android.bp @@ -0,0 +1,7 @@ +cc_library_static { + name: "libudfps_extension.a30s", + srcs: ["UdfpsExtension.cpp"], + include_dirs: [ + "frameworks/native/services/surfaceflinger/CompositionEngine/include" + ], +} diff --git a/a30s/fingerprint/UdfpsExtension.cpp b/a30s/fingerprint/UdfpsExtension.cpp new file mode 100644 index 0000000..964eca5 --- /dev/null +++ b/a30s/fingerprint/UdfpsExtension.cpp @@ -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 + +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; +}