summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-07-12 15:31:09 -0700
committerJohn Hoford <hoford@google.com>2013-07-17 11:26:52 -0700
commit5138b28530301bf751adecb87ed58a214cd55116 (patch)
treeac7f892e3216d11b0a1d240129a96d1e25ea93da /src_pd
parent06e34ad198138a9b9b5252af9dd54f2915d0551f (diff)
downloadandroid_packages_apps_Gallery2-5138b28530301bf751adecb87ed58a214cd55116.zip
android_packages_apps_Gallery2-5138b28530301bf751adecb87ed58a214cd55116.tar.gz
android_packages_apps_Gallery2-5138b28530301bf751adecb87ed58a214cd55116.tar.bz2
fix restoring frames
Change-Id: I77a75f3feb8a1affdb579e3c7b196928af1b2bf0
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java46
1 files changed, 24 insertions, 22 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index d4035cd..66372c2 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -22,6 +22,10 @@ import android.graphics.Color;
import com.android.gallery3d.R;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Vector;
+
public class FiltersManager extends BaseFiltersManager {
private static FiltersManager sInstance = null;
private static FiltersManager sPreviewInstance = null;
@@ -69,53 +73,51 @@ public class FiltersManager extends BaseFiltersManager {
mBorders.add(rep);
// Regular borders
+ ArrayList <FilterRepresentation> borderList = new ArrayList<FilterRepresentation>();
+
+
rep = new FilterImageBorderRepresentation(R.drawable.filtershow_border_4x5);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterImageBorderRepresentation(R.drawable.filtershow_border_brush);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterImageBorderRepresentation(R.drawable.filtershow_border_grunge);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterImageBorderRepresentation(R.drawable.filtershow_border_sumi_e);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterImageBorderRepresentation(R.drawable.filtershow_border_tape);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterColorBorderRepresentation(Color.BLACK, mImageBorderSize, 0);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterColorBorderRepresentation(Color.BLACK, mImageBorderSize,
mImageBorderSize);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterColorBorderRepresentation(Color.WHITE, mImageBorderSize, 0);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterColorBorderRepresentation(Color.WHITE, mImageBorderSize,
mImageBorderSize);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
int creamColor = Color.argb(255, 237, 237, 227);
rep = new FilterColorBorderRepresentation(creamColor, mImageBorderSize, 0);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
rep = new FilterColorBorderRepresentation(creamColor, mImageBorderSize,
mImageBorderSize);
- rep.setSerializationName(serializationNames[i++]);
- mBorders.add(rep);
+ borderList.add(rep);
+
+ for (FilterRepresentation filter : borderList) {
+ filter.setSerializationName(serializationNames[i++]);
+ addRepresentation(filter);
+ }
+
}
public static FiltersManager getHighresManager() {