Use valid context inside LauncherModel when calling loadAndBindXXX

b/20851075

Change-Id: Ie3feb387a142d4e11a0a18bbcc4fd4932cfe4439
This commit is contained in:
Hyunyoung Song
2015-05-05 10:07:23 -07:00
parent 8c3888b3aa
commit 9892e58740
+3 -1
View File
@@ -2863,11 +2863,13 @@ public class LauncherModel extends BroadcastReceiver
// Post callback on main thread
mHandler.post(new Runnable() {
public void run() {
final long bindTime = SystemClock.uptimeMillis();
final Callbacks callbacks = tryGetCallbacks(oldCallbacks);
if (callbacks != null) {
callbacks.bindAllApplications(added);
loadAndBindWidgetsAndShortcuts(mContext, callbacks, true /* refresh */);
loadAndBindWidgetsAndShortcuts(mApp.getContext(), callbacks,
true /* refresh */);
if (DEBUG_LOADERS) {
Log.d(TAG, "bound " + added.size() + " apps in "
+ (SystemClock.uptimeMillis() - bindTime) + "ms");