raviole: support touch sensitivity mode switching

Use a persist system property to control the touch driver attribute
file glove_mode.

0: default sensitivity mode (default)
1: high sensitivity mode

Bug: 173330977
Bug: 174189638
Test: manual test
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: Id5e31bd335f8872993ea82ad9a7e7217ed9de5c6
This commit is contained in:
Tai Kuo 2021-03-12 16:30:19 +08:00
parent 404d6b3a33
commit 7c202b299e
2 changed files with 14 additions and 0 deletions

View file

@ -27,3 +27,10 @@ on fs
# Fingerprint
chown system system /dev/goodix_fp
exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g6.app
# Toggle glove_mode according to touch_sensitivity_mode
on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
write /sys/class/spi_master/spi11/spi11.0/glove_mode 00
on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
write /sys/class/spi_master/spi11/spi11.0/glove_mode 01

View file

@ -34,3 +34,10 @@ on fs
on property:mfgapi.touchpanel.permission=1
chmod 0600 /sys/devices/virtual/sec/tsp/cmd
chown system system /sys/devices/virtual/sec/tsp/cmd
# Toggle glove_mode according to touch_sensitivity_mode
on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
write /sys/devices/virtual/sec/tsp/cmd "glove_mode,0"
on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
write /sys/devices/virtual/sec/tsp/cmd "glove_mode,1"