From 0b60aa2746305317f286ff44bee1416390645353 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 9 Jul 2020 09:12:44 +0200 Subject: [PATCH] power-libperfmgr: Always wait after changing DOUBLE_TAP_TO_WAKE This avoids that we enter a screen state where it doesn't react anymore if you quickly turn off and on the screen. Change-Id: I8d7fc756d1631e9f739dbe10554b58ba0c0c5576 --- hidl/power-libperfmgr/Power.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hidl/power-libperfmgr/Power.cpp b/hidl/power-libperfmgr/Power.cpp index b26c74b..d9b8aab 100644 --- a/hidl/power-libperfmgr/Power.cpp +++ b/hidl/power-libperfmgr/Power.cpp @@ -194,7 +194,7 @@ Return Power::setInteractive(bool interactive) { // It takes some time till the cmd is executed in the Kernel, there // is an interface to check that. To avoid that just wait for 25ms // till we turn off the touchscreen and lcd. - std::this_thread::sleep_for(25ms); + std::this_thread::sleep_for(20ms); } updateHint("NOT_INTERACTIVE", !interactive); @@ -202,6 +202,7 @@ Return Power::setInteractive(bool interactive) { // Disable dt2w after turning TSP back on if (mDoubleTapEnabled && interactive) { updateHint("DOUBLE_TAP_TO_WAKE", false); + std::this_thread::sleep_for(10ms); } return Void(); -- 2.20.1