am c88dceb0: Always set the LauncherAppState context before using it from a broadcast. (Bug 10947459)

* commit 'c88dceb0b567ab96418e73cf2f6b197ba2646cb3':
  Always set the LauncherAppState context before using it from a broadcast. (Bug 10947459)
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index b4d6ea5..821c15f 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -224,6 +224,7 @@
             data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE);
 
         // Queue the item up for adding if launcher has not loaded properly yet
+        LauncherAppState.setApplicationContext(context.getApplicationContext());
         LauncherAppState app = LauncherAppState.getInstance();
         boolean launcherNotLoaded = (app.getDynamicGrid() == null);
 
diff --git a/src/com/android/launcher3/UninstallShortcutReceiver.java b/src/com/android/launcher3/UninstallShortcutReceiver.java
index 00fa631..ccea4ec 100644
--- a/src/com/android/launcher3/UninstallShortcutReceiver.java
+++ b/src/com/android/launcher3/UninstallShortcutReceiver.java
@@ -78,6 +78,7 @@
             PendingUninstallShortcutInfo pendingInfo) {
         final Intent data = pendingInfo.data;
 
+        LauncherAppState.setApplicationContext(context.getApplicationContext());
         LauncherAppState app = LauncherAppState.getInstance();
         synchronized (app) { // TODO: make removeShortcut internally threadsafe
             removeShortcut(context, data);