summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2013-06-28 13:52:05 -0400
committerDaniel Sandler <dsandler@android.com>2013-06-28 13:52:05 -0400
commit04d554afcb5eeeaf5727c922e70d71817ec2d4af (patch)
treed9313c3cda1c22eefdb63fe54dd604cf705044d6
parent0becf1fa0cd4ff980bc36439a7c855c05d42bca2 (diff)
downloadandroid_packages_apps_Trebuchet-04d554afcb5eeeaf5727c922e70d71817ec2d4af.tar.gz
android_packages_apps_Trebuchet-04d554afcb5eeeaf5727c922e70d71817ec2d4af.tar.bz2
android_packages_apps_Trebuchet-04d554afcb5eeeaf5727c922e70d71817ec2d4af.zip
Supply a context to LauncherAppState from the PackageChangedReceiver.
Bug: 9621647 Change-Id: I1a713177a08fb737e6799d51f438d55f226006e8
-rw-r--r--src/com/android/launcher3/PackageChangedReceiver.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher3/PackageChangedReceiver.java b/src/com/android/launcher3/PackageChangedReceiver.java
index 1a8ec7f84..75a1e095c 100644
--- a/src/com/android/launcher3/PackageChangedReceiver.java
+++ b/src/com/android/launcher3/PackageChangedReceiver.java
@@ -13,6 +13,8 @@ public class PackageChangedReceiver extends BroadcastReceiver {
// they sent us a bad intent
return;
}
+ // in rare cases the receiver races with the application to set up LauncherAppState
+ LauncherAppState.setApplicationContext(context.getApplicationContext());
LauncherAppState app = LauncherAppState.getInstance();
WidgetPreviewLoader.removeFromDb(app.getWidgetPreviewCacheDb(), packageName);
}