Fixing nullpointer when creating new DB
LauncherProvider is not ready until the DBHelper is created
Change-Id: Iabd61005892f15fd4a31d882100d87df2b2a7b85
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index 5ca0ac8..629387e 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -59,7 +59,7 @@
* Note: synchronized block used for this variable is expensive and the block should always
* be posted to a background thread.
*/
- @Thunk Set<Bitmap> mUnusedBitmaps =
+ @Thunk final Set<Bitmap> mUnusedBitmaps =
Collections.newSetFromMap(new WeakHashMap<Bitmap, Boolean>());
private final Context mContext;
@@ -540,7 +540,7 @@
*/
public class PreviewLoadRequest {
- private final PreviewLoadTask mTask;
+ @Thunk final PreviewLoadTask mTask;
public PreviewLoadRequest(PreviewLoadTask task) {
mTask = task;