diff options
author | Bobby Georgescu <georgescu@google.com> | 2013-04-22 13:40:36 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-22 13:40:36 -0700 |
commit | 909cf84020e30ba901b5fd35d26d5d29fcbc5a85 (patch) | |
tree | ba7e00f131e2a80a7505dee08987a89dcf04979d /src/com/android/gallery3d/ui | |
parent | 9c0d72d36fa20fc9d2a21a87d37501589a7ffde4 (diff) | |
parent | faf2f040f38532213fa237cf45c9794cf1a85859 (diff) | |
download | android_packages_apps_Gallery2-909cf84020e30ba901b5fd35d26d5d29fcbc5a85.tar.gz android_packages_apps_Gallery2-909cf84020e30ba901b5fd35d26d5d29fcbc5a85.tar.bz2 android_packages_apps_Gallery2-909cf84020e30ba901b5fd35d26d5d29fcbc5a85.zip |
am faf2f040: Fix multi selection issue
* commit 'faf2f040f38532213fa237cf45c9794cf1a85859':
Fix multi selection issue
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r-- | src/com/android/gallery3d/ui/SelectionManager.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/ui/SelectionManager.java b/src/com/android/gallery3d/ui/SelectionManager.java index 9a2396d42..be6811bc1 100644 --- a/src/com/android/gallery3d/ui/SelectionManager.java +++ b/src/com/android/gallery3d/ui/SelectionManager.java @@ -187,8 +187,10 @@ public class SelectionManager { MediaSet set = mSourceMediaSet.getSubMediaSet(i); Path id = set.getPath(); if (!mClickedSet.contains(id)) { - if (expandSet && !expandMediaSet(selected, set, maxSelection)) { - return null; + if (expandSet) { + if (!expandMediaSet(selected, set, maxSelection)) { + return null; + } } else { selected.add(id); if (selected.size() > maxSelection) { @@ -199,9 +201,11 @@ public class SelectionManager { } } else { for (Path id : mClickedSet) { - if (expandSet && !expandMediaSet(selected, - mDataManager.getMediaSet(id), maxSelection)) { - return null; + if (expandSet) { + if (!expandMediaSet(selected, mDataManager.getMediaSet(id), + maxSelection)) { + return null; + } } else { selected.add(id); if (selected.size() > maxSelection) { |