OSDN Git Service

Prevent race condition when cancelling long-press for scroll.
authorJeff Sharkey <jsharkey@android.com>
Tue, 21 Apr 2009 04:03:13 +0000 (21:03 -0700)
committerJeff Sharkey <jsharkey@android.com>
Tue, 12 May 2009 01:18:16 +0000 (18:18 -0700)
commit83f111d129fcb8c50b35da789f0d75604b9c0864
tree051f86af9c88dd6df4b6198a99e292807f6b961c
parentecadabf578369def58e343c1adbb5537aa9801e4
Prevent race condition when cancelling long-press for scroll.

When dragging between workspaces in rapid succession, the canceling of the
original long-press timer wasn't being triggered correctly.  (When the timer
fires, it might read an invalid Workspace.allowLongPress() value.)

This patchset correctly cancels any pending long-press timers once a desktop
scroll begins, and we don't need to rely on the allowLongPress() value.
src/com/android/launcher/CellLayout.java
src/com/android/launcher/LauncherAppWidgetHostView.java