From cda49c53f57ca2fa1cf1273cd36bdd8919d87fca Mon Sep 17 00:00:00 2001 From: Rick Chen Date: Thu, 29 Jun 2023 15:02:18 +0800 Subject: [PATCH] hall_sensor: Disable hall sensor input when bootmode is unknown Bug: 284431215 Test: 1. No hall sensor in getevent. 2. Inner/outer screen can be switched in offmode charging, recovery, fastboot mode. Signed-off-by: Rick Chen (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:508fa1bcb45f6f5b75fc9e5475f2e8658588809e) Merged-In: Id9f93b4687898cf23601516cf69d0338df14e2aa Change-Id: Id9f93b4687898cf23601516cf69d0338df14e2aa --- conf/init.felix.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.felix.rc b/conf/init.felix.rc index 891865b..34059f0 100644 --- a/conf/init.felix.rc +++ b/conf/init.felix.rc @@ -117,6 +117,9 @@ on post-fs-data on init && property:ro.bootmode=normal write /sys/devices/platform/hall_sensor/enable 0 +on init && property:ro.bootmode=unknown + write /sys/devices/platform/hall_sensor/enable 0 + on init && property:ro.bootmode=factory write /sys/devices/platform/hall_sensor/enable 0