diff options
author | Patrick Dubroy <dubroy@google.com> | 2011-02-11 10:41:52 -0800 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2011-02-11 10:41:52 -0800 |
commit | 982af49707933862b35a39acfc700a2fd74c9d80 (patch) | |
tree | 741cf9948a7b701f649c5b213c42464d21f4e90a /src | |
parent | 3ff99d73d86fd604ca78278359e315486c5e26eb (diff) | |
download | android_packages_wallpapers_LivePicker-982af49707933862b35a39acfc700a2fd74c9d80.tar.gz android_packages_wallpapers_LivePicker-982af49707933862b35a39acfc700a2fd74c9d80.tar.bz2 android_packages_wallpapers_LivePicker-982af49707933862b35a39acfc700a2fd74c9d80.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/wallpaper/livepicker/LiveWallpaperListAdapter.java | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |