diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-21 14:21:17 +0800 |
---|---|---|
committer | Adnan <adnan@cyngn.com> | 2014-09-03 15:41:22 -0700 |
commit | 930a641a262324805699324c888ba522a5a648e0 (patch) | |
tree | 5d5907d4fb3740cfccf1149ffb52b376e99d0f1a | |
parent | d0ae28c5ffbf2516f656d4ba1c78c2611ea9ab73 (diff) | |
download | android_packages_apps_UnifiedEmail-930a641a262324805699324c888ba522a5a648e0.tar.gz android_packages_apps_UnifiedEmail-930a641a262324805699324c888ba522a5a648e0.tar.bz2 android_packages_apps_UnifiedEmail-930a641a262324805699324c888ba522a5a648e0.zip |
Email:Move the mails belong to the swiping folder
Since the record in mCurrView is not always cleared before it is
reused, when try to swipe a non-swipeable item, the cached item in
mCurrView might be used to swipe.
Clear the content of mCurrView if the touched item is not swipeable.
CRs-fixed: 649478
Change-Id: I18c19a1c1a661d0ce68481351376c2948210e617
-rw-r--r-- | src/com/android/mail/ui/SwipeHelper.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/mail/ui/SwipeHelper.java b/src/com/android/mail/ui/SwipeHelper.java index 1b869d5a4..100c8be36 100644 --- a/src/com/android/mail/ui/SwipeHelper.java +++ b/src/com/android/mail/ui/SwipeHelper.java @@ -208,6 +208,10 @@ public class SwipeHelper { View view = mCallback.getChildAtPosition(ev); if (view instanceof SwipeableItemView) { mCurrView = (SwipeableItemView) view; + } else { + // If the touched item is not a swipeable one, clean the cache in + // mCurrView to make sure nothing will be swiped for this action + mCurrView = null; } mVelocityTracker.clear(); if (mCurrView != null) { |