diff options
| author | Bobby Georgescu <georgescu@google.com> | 2013-04-19 11:27:29 -0700 |
|---|---|---|
| committer | Bobby Georgescu <georgescu@google.com> | 2013-04-19 11:27:29 -0700 |
| commit | faf2f040f38532213fa237cf45c9794cf1a85859 (patch) | |
| tree | 6ecc0e79a4281ecbace3da2117d045251b810cf2 /src/com | |
| parent | 32049103305c99e8be1f7af3e46933277e02a7c3 (diff) | |
| download | android_packages_apps_Gallery2-faf2f040f38532213fa237cf45c9794cf1a85859.tar.gz android_packages_apps_Gallery2-faf2f040f38532213fa237cf45c9794cf1a85859.tar.bz2 android_packages_apps_Gallery2-faf2f040f38532213fa237cf45c9794cf1a85859.zip | |
Fix multi selection issue
Bug: 8663155
Change-Id: Ic6aa98c04b5134df9deb1b14736e614bf1618f03
Diffstat (limited to 'src/com')
| -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) { |
