From a096bb29ed1a6c7d6fe2b58c5166af4ce1fbe1a9 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Mon, 29 Nov 2021 20:54:35 +0100 Subject: [PATCH] universal7885: Enable fingerprint gestures Change-Id: I3289fac865b8d7bf5900d8fa8b3f5b03b818a230 Signed-off-by: SamarV-121 Signed-off-by: roynatech2544 --- universal7885-common/BoardConfigCommon.mk | 3 +++ .../configs/keylayout/uinput-sec-fp.kl | 18 ++++++++++++++++++ .../base/core/res/res/values/config.xml | 3 ++- .../sepolicy/vendor/hal_fingerprint_default.te | 2 ++ universal7885-common/universal7885-common.mk | 5 +++-- 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 universal7885-common/configs/keylayout/uinput-sec-fp.kl diff --git a/universal7885-common/BoardConfigCommon.mk b/universal7885-common/BoardConfigCommon.mk index 67a4679..27e01f5 100644 --- a/universal7885-common/BoardConfigCommon.mk +++ b/universal7885-common/BoardConfigCommon.mk @@ -47,6 +47,9 @@ TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_F2FS := true BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +# Fingerprint +TARGET_SEC_FP_HAS_FINGERPRINT_GESTURES := true + # Include TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include diff --git a/universal7885-common/configs/keylayout/uinput-sec-fp.kl b/universal7885-common/configs/keylayout/uinput-sec-fp.kl new file mode 100644 index 0000000..b558ffc --- /dev/null +++ b/universal7885-common/configs/keylayout/uinput-sec-fp.kl @@ -0,0 +1,18 @@ +# +# Copyright (C) 2021 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. +# + +key 108 SYSTEM_NAVIGATION_DOWN +key 103 SYSTEM_NAVIGATION_UP diff --git a/universal7885-common/overlay/frameworks/base/core/res/res/values/config.xml b/universal7885-common/overlay/frameworks/base/core/res/res/values/config.xml index 77472e2..f671be5 100644 --- a/universal7885-common/overlay/frameworks/base/core/res/res/values/config.xml +++ b/universal7885-common/overlay/frameworks/base/core/res/res/values/config.xml @@ -57,7 +57,8 @@ OFF true true - + + true true diff --git a/universal7885-common/sepolicy/vendor/hal_fingerprint_default.te b/universal7885-common/sepolicy/vendor/hal_fingerprint_default.te index cdd5d0d..1482ba5 100644 --- a/universal7885-common/sepolicy/vendor/hal_fingerprint_default.te +++ b/universal7885-common/sepolicy/vendor/hal_fingerprint_default.te @@ -22,3 +22,5 @@ allow hal_fingerprint_default sysfs_virtual:file r_file_perms; allow hal_fingerprint_default goodix_device:chr_file rw_file_perms; allow hal_fingerprint_default self:netlink_socket { bind create write read }; +allow hal_fingerprint_default uhid_device:chr_file rw_file_perms; + diff --git a/universal7885-common/universal7885-common.mk b/universal7885-common/universal7885-common.mk index bb5e54f..bf5da90 100644 --- a/universal7885-common/universal7885-common.mk +++ b/universal7885-common/universal7885-common.mk @@ -126,8 +126,9 @@ PRODUCT_PACKAGES += \ # Keylayout PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/keylayout/Codec3035_Headset_Events.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/Codec3035_Headset_Events.kl - + $(LOCAL_PATH)/configs/keylayout/Codec3035_Headset_Events.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/Codec3035_Headset_Events.kl \ + $(LOCAL_PATH)/configs/keylayout/uinput-sec-fp.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-sec-fp.kl + # Keymaster PRODUCT_PACKAGES += \ android.hardware.keymaster@4.0-service.samsung \