From c0a973b2dbdfbb3dffdc35a2f65ebb19fd58bbc4 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Fri, 21 Jun 2019 19:05:24 +0800 Subject: [PATCH] sm8250-common: tri-state-key: Fix vibrate position for op8p --- tri-state-key/main.cpp | 4 +++- tri-state-key/tri-state-key_daemon.rc | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tri-state-key/main.cpp b/tri-state-key/main.cpp index 856b1de..a721634 100644 --- a/tri-state-key/main.cpp +++ b/tri-state-key/main.cpp @@ -79,8 +79,10 @@ int main() { return; } + LOG(INFO) << uevent.state; + bool none = uevent.state.find("USB=0") != std::string::npos; - bool vibration = uevent.state.find("USB_HOST=0") != std::string::npos; + bool vibration = uevent.state.find("USB-HOST=0") != std::string::npos; bool silent = uevent.state.find("null)=0") != std::string::npos; int keyCode; diff --git a/tri-state-key/tri-state-key_daemon.rc b/tri-state-key/tri-state-key_daemon.rc index 05bdc9f..c8204d9 100644 --- a/tri-state-key/tri-state-key_daemon.rc +++ b/tri-state-key/tri-state-key_daemon.rc @@ -1,3 +1,6 @@ +on fs + start tri-state-key_daemon + service tri-state-key_daemon /system/bin/tri-state-key_daemon class late_start user system