diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-03-11 18:41:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-03-11 18:41:39 +0000 |
commit | 91cd1c2654ed9d7540be06569b548569aa9ecd28 (patch) | |
tree | 1a51986aa18bcd78c45f58a428566afc013d93f4 /src/com/android/gallery3d/filtershow/FilterShowActivity.java | |
parent | 6320d90fb41fe1276a02b17fa27a660e76f21ba8 (diff) | |
download | android_packages_apps_Snap-91cd1c2654ed9d7540be06569b548569aa9ecd28.tar.gz android_packages_apps_Snap-91cd1c2654ed9d7540be06569b548569aa9ecd28.tar.bz2 android_packages_apps_Snap-91cd1c2654ed9d7540be06569b548569aa9ecd28.zip |
Revert "Clear Gallery's bitmap pool on photo editor start. Minor refactoring."
This reverts commit 65948b17607d6fab9a2561749a90e16889fd1eea
Change-Id: Iea682767fced173fe56dd6e91244f0ef70d1f74b
Diffstat (limited to 'src/com/android/gallery3d/filtershow/FilterShowActivity.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index d6a49ebe5..e36a3841e 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -91,7 +91,6 @@ import com.android.gallery3d.filtershow.ui.FilterIconButton; import com.android.gallery3d.filtershow.ui.FramedTextButton; import com.android.gallery3d.filtershow.ui.Spline; import com.android.gallery3d.util.GalleryUtils; -import com.android.photos.data.GalleryBitmapPool; import java.io.File; import java.io.IOException; @@ -147,8 +146,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - clearGalleryBitmapPoolInBackground(); - setupMasterImage(); setDefaultValues(); fillEditors(); @@ -511,24 +508,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, } - void clearGalleryBitmapPoolInBackground() { - BitmapTask.Callbacks<Object, Object> cb = new BitmapTask.Callbacks<Object, Object>() { - @Override - public void onComplete(Object result) {} - - @Override - public void onCancel() {} - - @Override - public Object onExecute(Object param) { - // Free memory held in Gallery's Bitmap pool. May be O(n) for n bitmaps. - GalleryBitmapPool.getInstance().clear(); - return null; - } - }; - (new BitmapTask<Object, Object>(cb)).execute(0); - } - private void fillButtonIcons() { Bitmap bmap = mImageLoader.getOriginalBitmapSmall(); if (bmap != null && bmap.getWidth() > 0 && bmap.getHeight() > 0) { @@ -1142,7 +1121,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, void setWallpaperInBackground(final Bitmap bmap) { Toast.makeText(this, R.string.setting_wallpaper, Toast.LENGTH_LONG).show(); - BitmapTask.Callbacks<FilterShowActivity, Bitmap> cb = new BitmapTask.Callbacks<FilterShowActivity, Bitmap>() { + BitmapTask.Callbacks<FilterShowActivity> cb = new BitmapTask.Callbacks<FilterShowActivity>() { @Override public void onComplete(Bitmap result) {} @@ -1151,9 +1130,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, @Override public Bitmap onExecute(FilterShowActivity param) { - if (param == null) { - return null; - } try { WallpaperManager.getInstance(param).setBitmap(bmap); } catch (IOException e) { @@ -1162,7 +1138,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, return null; } }; - (new BitmapTask<FilterShowActivity, Bitmap>(cb)).execute(this); + (new BitmapTask<FilterShowActivity>(cb)).execute(this); } public void done() { |