summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2013-02-26 01:18:51 (GMT)
committerRuben Brunk <rubenbrunk@google.com>2013-02-26 02:49:49 (GMT)
commitf26b3580d1f2f9a3736fb77aebf0ebb9d5a33001 (patch)
tree385c43dc8726d9c4cfa0505fc290ab8325f4ba51 /src_pd
parent02ef5ba117462eda524820b6004f84d26b28f647 (diff)
downloadandroid_packages_apps_Snap-f26b3580d1f2f9a3736fb77aebf0ebb9d5a33001.zip
android_packages_apps_Snap-f26b3580d1f2f9a3736fb77aebf0ebb9d5a33001.tar.gz
android_packages_apps_Snap-f26b3580d1f2f9a3736fb77aebf0ebb9d5a33001.tar.bz2
Fixed more of filtershows large bitmap reference leaks.
Bug: 8253109 Change-Id: Iaff381e759d02baae701a01d6c081c49f4b3c772
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index 988cf2d..b05b546 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -16,13 +16,24 @@
package com.android.gallery3d.filtershow.filters;
+import java.util.HashMap;
+
public class FiltersManager extends BaseFiltersManager {
- private static FiltersManager gInstance = null;
+ private static FiltersManager sInstance = null;
+
+ protected FiltersManager() {
+ mFilters = new HashMap<Class, ImageFilter>();
+ addFilters(mFilters);
+ }
public static FiltersManager getManager() {
- if (gInstance == null) {
- gInstance = new FiltersManager();
+ if (sInstance == null) {
+ sInstance = new FiltersManager();
}
- return gInstance;
+ return sInstance;
+ }
+
+ public static void reset() {
+ sInstance = null;
}
}