diff options
author | Sascha Haeberling <haeberling@google.com> | 2013-05-20 14:09:27 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-05-20 14:09:27 -0700 |
commit | f2697daa3a5f114216488022ca513cb7811075b9 (patch) | |
tree | 5fd50d7e111b59c3171c9b4496343644a2eeec0f /src/com/android/gallery3d | |
parent | 22fcfeb20d601ca73dcfa374a46d3b370bef1929 (diff) | |
parent | 7af7156a809934951877b1f9b9ad1ceeb9c9a5ce (diff) | |
download | android_packages_apps_Gallery2-f2697daa3a5f114216488022ca513cb7811075b9.tar.gz android_packages_apps_Gallery2-f2697daa3a5f114216488022ca513cb7811075b9.tar.bz2 android_packages_apps_Gallery2-f2697daa3a5f114216488022ca513cb7811075b9.zip |
am 7af7156a: Merge "Make sure canceling a filter does not undo previous filter." into gb-ub-photos-bryce
* commit '7af7156a809934951877b1f9b9ad1ceeb9c9a5ce':
Make sure canceling a filter does not undo previous filter.
Diffstat (limited to 'src/com/android/gallery3d')
-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; |