From 982af49707933862b35a39acfc700a2fd74c9d80 Mon Sep 17 00:00:00 2001 From: Patrick Dubroy Date: Fri, 11 Feb 2011 10:41:52 -0800 Subject: Fix 3421874: Crash when quickly tapping in wallpaper picker screen We can't do a UI operation on a background thread. Fix is to move the code into onProgressUpdate, which runs on the UI thread. --- src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/com/android/wallpaper') diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java b/src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java index 6c07dcd..b10de8b 100644 --- a/src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java +++ b/src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java @@ -231,10 +231,7 @@ public class LiveWallpaperListAdapter extends BaseAdapter implements ListAdapter thumb = new BitmapDrawable(res, thumbnail); } - - thumb.setDither(true); wallpaper.thumbnail = thumb; - publishProgress(wallpaper); } @@ -244,6 +241,7 @@ public class LiveWallpaperListAdapter extends BaseAdapter implements ListAdapter @Override protected void onProgressUpdate(LiveWallpaperInfo...infos) { for (LiveWallpaperInfo info : infos) { + info.thumbnail.setDither(true); if (mWallpaperPosition < mWallpapers.size()) { mWallpapers.set(mWallpaperPosition, info); } else { -- cgit v1.2.3