diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/WallpaperPickerActivity.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java index efc311070..2da05c92b 100644 --- a/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/src/com/android/launcher3/WallpaperPickerActivity.java @@ -84,7 +84,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { public static final int PICK_WALLPAPER_THIRD_PARTY_ACTIVITY = 6; public static final int PICK_LIVE_WALLPAPER = 7; private static final String TEMP_WALLPAPER_TILES = "TEMP_WALLPAPER_TILES"; - private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb.jpg"; + private static final String OLD_DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb.jpg"; + private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb2.jpg"; private View mSelectedTile; private boolean mIgnoreNextTap; @@ -860,16 +861,19 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { thumb = BitmapFactory.decodeFile(defaultThumbFile.getAbsolutePath()); defaultWallpaperExists = true; } else { + // Delete old thumbnail file, since we had a bug where the thumbnail wasn't being drawn + // before + new File(getFilesDir(), OLD_DEFAULT_WALLPAPER_THUMBNAIL_FILENAME).delete(); + Resources res = getResources(); Point defaultThumbSize = getDefaultThumbnailSize(res); - Paint p = new Paint(); - p.setFilterBitmap(true); Drawable wallpaperDrawable = WallpaperManager.getInstance(this).getBuiltInDrawable( defaultThumbSize.x, defaultThumbSize.y, true, 0.5f, 0.5f); if (wallpaperDrawable != null) { thumb = Bitmap.createBitmap( defaultThumbSize.x, defaultThumbSize.y, Bitmap.Config.ARGB_8888); Canvas c = new Canvas(thumb); + wallpaperDrawable.setBounds(0, 0, defaultThumbSize.x, defaultThumbSize.y); wallpaperDrawable.draw(c); c.setBitmap(null); } |