diff options
Diffstat (limited to 'src/com/android/gallery3d/filtershow/FilterShowActivity.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index f7147eac1..7e8a3f582 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -71,6 +71,7 @@ import com.android.gallery3d.filtershow.imageshow.ImageZoom; import com.android.gallery3d.filtershow.imageshow.MasterImage; import com.android.gallery3d.filtershow.presets.ImagePreset; import com.android.gallery3d.filtershow.provider.SharedImageProvider; +import com.android.gallery3d.filtershow.tools.BitmapTask; import com.android.gallery3d.filtershow.tools.SaveCopyTask; import com.android.gallery3d.filtershow.ui.FilterIconButton; import com.android.gallery3d.filtershow.ui.FramedTextButton; @@ -814,7 +815,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, } public void hideImageViews() { - mImageShow.setShowControls(false); // reset for (View view : mImageViews) { view.setVisibility(View.GONE); } @@ -1090,11 +1090,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, mCropExtras.getOutputFormat(), this); } if (mSaveAsWallpaper) { - try { - WallpaperManager.getInstance(this).setBitmap(filtered); - } catch (IOException e) { - Log.w(LOGTAG, "fail to set wall paper", e); - } + setWallpaperInBackground(filtered); } if (mReturnAsExtra) { if (filtered != null) { @@ -1117,6 +1113,28 @@ 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> cb = new BitmapTask.Callbacks<FilterShowActivity>() { + @Override + public void onComplete(Bitmap result) {} + + @Override + public void onCancel() {} + + @Override + public Bitmap onExecute(FilterShowActivity param) { + try { + WallpaperManager.getInstance(param).setBitmap(bmap); + } catch (IOException e) { + Log.w(LOGTAG, "fail to set wall paper", e); + } + return null; + } + }; + (new BitmapTask<FilterShowActivity>(cb)).execute(this); + } + public void done() { if (mOutputted) { hideSavingProgress(); |