Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d283a68 authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am 7ab5d2d9: am a87ea46c: Fix bugs related to cheek event suppression.

* commit '7ab5d2d951792c9b1a1e7cfb279280c2d076506f':
  Fix bugs related to cheek event suppression.
parents d6a3cddb 5d0a9b47
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@

namespace android {

// Delay between reporting long touch events to the power manager.
const nsecs_t EVENT_IGNORE_DURATION = 300 * 1000000LL; // 300 ms
// Delay before reporting long touch events to the power manager.
const nsecs_t LONG_TOUCH_DELAY = 300 * 1000000LL; // 300 ms

// Default input dispatching timeout if there is no focused application or paused window
// from which to determine an appropriate dispatching timeout.
@@ -1424,7 +1424,7 @@ void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
                eventType = POWER_MANAGER_TOUCH_UP_EVENT;
                break;
            default:
                if (motionEntry->eventTime - motionEntry->downTime >= EVENT_IGNORE_DURATION) {
                if (motionEntry->eventTime - motionEntry->downTime < LONG_TOUCH_DELAY) {
                    eventType = POWER_MANAGER_TOUCH_EVENT;
                } else {
                    eventType = POWER_MANAGER_LONG_TOUCH_EVENT;