summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/ThemeChangedReceiver.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/ThemeChangedReceiver.java b/src/com/android/launcher3/ThemeChangedReceiver.java
index 9af5da4..6dac0be 100644
--- a/src/com/android/launcher3/ThemeChangedReceiver.java
+++ b/src/com/android/launcher3/ThemeChangedReceiver.java
@@ -33,7 +33,11 @@ public class ThemeChangedReceiver extends BroadcastReceiver {
// components is a string array of the components that changed
ArrayList<String> components = intent.getStringArrayListExtra(EXTRA_COMPONENTS);
if (isInterestingThemeChange(components)) {
- LauncherAppState app = LauncherAppState.getInstance();
+ LauncherAppState app = LauncherAppState.getInstanceNoCreate();
+ if (app == null) {
+ LauncherAppState.setApplicationContext(context);
+ app = LauncherAppState.getInstance();
+ }
clearAppIconCache(context);
clearWidgetPreviewCache(context);
app.recreateWidgetPreviewDb();