diff options
author | Michael Jurka <mikejurka@google.com> | 2010-09-14 17:35:20 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2010-09-14 17:56:01 -0700 |
commit | 1ff706b8c03063740ca74868fea46fa47d71bb27 (patch) | |
tree | 2e4d7b4fb2305d052032be774a4feeaeccf21440 /src/com/android/launcher2 | |
parent | cfc629446ca86366665263dba6520a7b978b7c3e (diff) | |
download | android_packages_apps_Trebuchet-1ff706b8c03063740ca74868fea46fa47d71bb27.tar.gz android_packages_apps_Trebuchet-1ff706b8c03063740ca74868fea46fa47d71bb27.tar.bz2 android_packages_apps_Trebuchet-1ff706b8c03063740ca74868fea46fa47d71bb27.zip |
fix two crashes
* fix crash where Workspace gets an ACTION_MOVE
but didn't get the ACTION_DOWN before it
* fix crash in DimmableBubbleTextView on
non-xlarge devices (buganizer bug#3001211)
Change-Id: I419b4a9fd3c95df9949f1d46746845ad2dc4b831
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index ebb28f928..1e0dad4ae 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -545,15 +545,21 @@ public abstract class PagedView extends ViewGroup { return true; } - switch (action & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_MOVE: { /* * mIsBeingDragged == false, otherwise the shortcut would have caught it. Check * whether the user has moved far enough from his original down touch. */ - determineScrollingStart(ev); - break; + if (mActivePointerId != INVALID_POINTER) { + determineScrollingStart(ev); + break; + } + // if mActivePointerId is INVALID_POINTER, then we must have missed an ACTION_DOWN + // event. in that case, treat the first occurence of a move event as a ACTION_DOWN + // i.e. fall through to the next case (don't break) + // (We sometimes miss ACTION_DOWN events in Workspace because it ignores all events + // while it's small- this was causing a crash before we checked for INVALID_POINTER) } case MotionEvent.ACTION_DOWN: { |