From ef3a8234824cc9f7c3464dd05f9aeca8ea77ebd9 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 18 Oct 2010 13:21:23 -0700 Subject: Fix bug where home presses were not poking user activity. We now poke user activity twice: once upon dequeueing an event for dispatch and then again just before we dispatch it. The second poke is to compensate for the fact that it can take a few seconds to identify the dispatch target (if the application is responding slowly) but we want to keep the display from going to sleep for X amount of time after the app gets a chance to actually receive the event. This mirrors pre-Gingerbread behavior. Removed some unnecessary code that filters user activity pokes when sending events to KeyGuard. We don't need this because KeyGuard already tells the power manager to disable user activity. Bug: 3101397 Change-Id: I8c3a77601fdef8f584e84cfdd11aa79da0ff51db --- include/ui/InputDispatcher.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h index 4955d47..b0b855e 100644 --- a/include/ui/InputDispatcher.h +++ b/include/ui/InputDispatcher.h @@ -109,9 +109,6 @@ struct InputTarget { // (ignored for KeyEvents) float xOffset, yOffset; - // The window type of the input target. - int32_t windowType; - // The subset of pointer ids to include in motion events dispatched to this input target // if FLAG_SPLIT is set. BitSet32 pointerIds; @@ -1004,8 +1001,7 @@ private: void addWindowTargetLocked(const InputWindow* window, int32_t targetFlags, BitSet32 pointerIds); void addMonitoringTargetsLocked(); - bool shouldPokeUserActivityForCurrentInputTargetsLocked(); - void pokeUserActivityLocked(nsecs_t eventTime, int32_t eventType); + void pokeUserActivityLocked(const EventEntry* eventEntry); bool checkInjectionPermission(const InputWindow* window, const InjectionState* injectionState); bool isWindowObscuredAtPointLocked(const InputWindow* window, int32_t x, int32_t y) const; bool isWindowFinishedWithPreviousInputLocked(const InputWindow* window); -- cgit v1.1