summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSascha Haeberling <haeberling@google.com>2013-05-20 21:07:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-20 21:07:01 +0000
commitd54f6082ca219c82a525553e2a405cbca92e9dfb (patch)
treea3284db7c821051c88e0e4727e5f0b3cc6de68d9 /src/com
parent31c1feb195c778c431b4ec69abd80ee01cc9a5e9 (diff)
parent6120af1f6b886191f92a6780957ced8b500e467d (diff)
downloadandroid_packages_apps_Snap-d54f6082ca219c82a525553e2a405cbca92e9dfb.tar.gz
android_packages_apps_Snap-d54f6082ca219c82a525553e2a405cbca92e9dfb.tar.bz2
android_packages_apps_Snap-d54f6082ca219c82a525553e2a405cbca92e9dfb.zip
Merge "Make sure canceling a filter does not undo previous filter." into gb-ub-photos-bryce
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/filtershow/HistoryAdapter.java20
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;