summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/presets/ImagePreset.java')
-rw-r--r--src/com/android/gallery3d/filtershow/presets/ImagePreset.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
index 9c5e2ae65..808288f89 100644
--- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
@@ -113,6 +113,15 @@ public class ImagePreset {
return null;
}
+ public int getPositionForType(int type) {
+ for (int i = 0; i < mFilters.size(); i++) {
+ if (mFilters.elementAt(i).getFilterType() == type) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
public FilterRepresentation getFilterRepresentationCopyFrom(FilterRepresentation filterRepresentation) {
// TODO: add concept of position in the filters (to allow multiple instances)
if (filterRepresentation == null) {