diff options
author | nicolasroard <nicolasroard@google.com> | 2013-06-25 16:32:01 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2013-06-27 11:39:33 -0700 |
commit | c75824ac1422e011cb001abc25560aba97d56254 (patch) | |
tree | 682f42b9d6a906ea3d13a1cfa334ef637468911e /src/com/android/gallery3d/filtershow/presets/ImagePreset.java | |
parent | b270df4d01b459d445bd861c8cea52cdf90ed441 (diff) | |
download | android_packages_apps_Snap-c75824ac1422e011cb001abc25560aba97d56254.tar.gz android_packages_apps_Snap-c75824ac1422e011cb001abc25560aba97d56254.tar.bz2 android_packages_apps_Snap-c75824ac1422e011cb001abc25560aba97d56254.zip |
Fix selected frame in looks and borders
Change-Id: Id1839a028f3044929043d7c910df30a1fcabdda1
Diffstat (limited to 'src/com/android/gallery3d/filtershow/presets/ImagePreset.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/presets/ImagePreset.java | 9 |
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) { |