rw-system: add 'daisy' stock keylayout files

1-2. because gestures not works (exist in some gsi, same as stock -
swipe for notifications)
3. daisy-buttonJack.kl need for headphones volume control by headphones' buttons

	modified:   base.mk
	new file:   files/daisy-buttonJack.kl
	new file:   files/daisy-uinput-fpc.kl
	new file:   files/daisy-uinput-goodix.kl
	modified:   rw-system.sh
This commit is contained in:
Victor Bo 2019-12-25 09:26:37 +02:00
parent 0ae6b5b05c
commit 13a9b1e26d
5 changed files with 71 additions and 1 deletions

View File

@ -115,6 +115,9 @@ PRODUCT_COPY_FILES += \
device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl \
device/phh/treble/files/oppo-touchpanel.kl:system/phh/oppo-touchpanel.kl \
device/phh/treble/files/google-uinput-fpc.kl:system/phh/google-uinput-fpc.kl \
device/phh/treble/files/daisy-buttonJack.kl:system/phh/daisy-buttonJack.kl \
device/phh/treble/files/daisy-uinput-fpc.kl:system/phh/daisy-uinput-fpc.kl \
device/phh/treble/files/daisy-uinput-goodix.kl:system/phh/daisy-uinput-goodix.kl
SELINUX_IGNORE_NEVERALLOWS := true

30
files/daisy-buttonJack.kl Normal file
View File

@ -0,0 +1,30 @@
# Copyright (c) 2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 226 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN

11
files/daisy-uinput-fpc.kl Normal file
View File

@ -0,0 +1,11 @@
##################################
#
#add for fpc fingerprints
#
##################################
key 195 SYSTEM_NAVIGATION_UP
key 196 SYSTEM_NAVIGATION_DOWN
key 197 SYSTEM_NAVIGATION_LEFT
key 198 SYSTEM_NAVIGATION_RIGHT
key 353 DPAD_CENTER

View File

@ -0,0 +1,11 @@
##################################
#
#add for goodix fingerprints
#
##################################
key 195 SYSTEM_NAVIGATION_UP
key 196 SYSTEM_NAVIGATION_DOWN
key 197 SYSTEM_NAVIGATION_LEFT
key 198 SYSTEM_NAVIGATION_RIGHT
key 353 DPAD_CENTER

View File

@ -87,7 +87,7 @@ changeKeylayout() {
-e xiaomi/polaris -e xiaomi/sirius -e xiaomi/dipper \
-e xiaomi/wayne -e xiaomi/jasmine -e xiaomi/jasmine_sprout \
-e xiaomi/platina -e iaomi/perseus -e xiaomi/ysl -e Redmi/begonia\
-e xiaomi/nitrogen -e xiaomi/daisy -e xiaomi/sakura -e xiaomi/andromeda \
-e xiaomi/nitrogen -e xiaomi/sakura -e xiaomi/andromeda \
-e xiaomi/whyred -e xiaomi/tulip -e xiaomi/onc; then
if [ ! -f /mnt/phh/keylayout/uinput-goodix.kl ]; then
cp /system/phh/empty /mnt/phh/keylayout/uinput-goodix.kl
@ -101,6 +101,21 @@ changeKeylayout() {
fi
fi
if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/daisy; then
mpk="/mnt/phh/keylayout"
cp /system/phh/daisy-buttonJack.kl ${mpk}/msm8953-snd-card-mtp_Button_Jack.kl
changed=true
if [ ! -f /mnt/phh/keylayout/uinput-goodix.kl ]; then
cp /system/phh/daisy-uinput-goodix.kl ${mpk}/uinput-goodix.kl
changed=true
fi
if [ ! -f /mnt/phh/keylayout/uinput-fpc.kl ]; then
cp /system/phh/daisy-uinput-fpc.kl ${mpk}/uinput-fpc.kl
changed=true
fi
chmod 0644 ${mpk}/uinput* ${mpk}/msm8953*
fi
if getprop ro.vendor.build.fingerprint | grep -qi oneplus/oneplus6/oneplus6; then
cp /system/phh/oneplus6-synaptics_s3320.kl /mnt/phh/keylayout/synaptics_s3320.kl
chmod 0644 /mnt/phh/keylayout/synaptics_s3320.kl