From b4cbea4ad4ce06b591603a47f86cfd9df838ccb1 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 16 Jun 2015 15:10:36 -0700 Subject: Fixing nullpointer when creating new DB LauncherProvider is not ready until the DBHelper is created Change-Id: Iabd61005892f15fd4a31d882100d87df2b2a7b85 --- src/com/android/launcher3/WidgetPreviewLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com/android/launcher3/WidgetPreviewLoader.java') diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java index 5ca0ac8d6..629387ed0 100644 --- a/src/com/android/launcher3/WidgetPreviewLoader.java +++ b/src/com/android/launcher3/WidgetPreviewLoader.java @@ -59,7 +59,7 @@ public class WidgetPreviewLoader { * Note: synchronized block used for this variable is expensive and the block should always * be posted to a background thread. */ - @Thunk Set mUnusedBitmaps = + @Thunk final Set mUnusedBitmaps = Collections.newSetFromMap(new WeakHashMap()); private final Context mContext; @@ -540,7 +540,7 @@ public class WidgetPreviewLoader { */ public class PreviewLoadRequest { - private final PreviewLoadTask mTask; + @Thunk final PreviewLoadTask mTask; public PreviewLoadRequest(PreviewLoadTask task) { mTask = task; -- cgit v1.2.3