diff options
author | Sascha Haeberling <haeberling@google.com> | 2013-05-20 14:11:35 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-20 14:11:35 -0700 |
commit | 4925d79902524b506c04aa769c6aa3788a7be2d0 (patch) | |
tree | 10accd972d9beb639c14c0ef64171ea008a4d932 /src/com/android | |
parent | 706ed7ebf21b5936b2d5b908a239be3e05160518 (diff) | |
parent | f2697daa3a5f114216488022ca513cb7811075b9 (diff) | |
download | android_packages_apps_Gallery2-4925d79902524b506c04aa769c6aa3788a7be2d0.tar.gz android_packages_apps_Gallery2-4925d79902524b506c04aa769c6aa3788a7be2d0.tar.bz2 android_packages_apps_Gallery2-4925d79902524b506c04aa769c6aa3788a7be2d0.zip |
am f2697daa: am 7af7156a: Merge "Make sure canceling a filter does not undo previous filter." into gb-ub-photos-bryce
* commit 'f2697daa3a5f114216488022ca513cb7811075b9':
Make sure canceling a filter does not undo previous filter.
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/gallery3d/filtershow/HistoryAdapter.java | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/com/android/gallery3d/filtershow/HistoryAdapter.java b/src/com/android/gallery3d/filtershow/HistoryAdapter.java index 1d47160cd..79460be4d 100644 --- a/src/com/android/gallery3d/filtershow/HistoryAdapter.java +++ b/src/com/android/gallery3d/filtershow/HistoryAdapter.java @@ -133,21 +133,8 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } public void addHistoryItem(ImagePreset preset) { - if (canAddHistoryItem(preset)) { - insert(preset, 0); - updateMenuItems(); - } - } - - public boolean canAddHistoryItem(ImagePreset preset) { - if (getCount() > 0 && getCurrent().same(preset)) { - // we may still want to insert if the previous - // history element isn't the same - if (getLast().historyName().equalsIgnoreCase(preset.historyName())) { - return false; - } - } - return true; + insert(preset, 0); + updateMenuItems(); } @Override @@ -164,9 +151,6 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> { } mCurrentPresetPosition = position; this.notifyDataSetChanged(); - if (!canAddHistoryItem(preset)) { - return; - } } super.insert(preset, position); mCurrentPresetPosition = position; |