Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9892e587 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Use valid context inside LauncherModel when calling loadAndBindXXX

b/20851075

Change-Id: Ie3feb387a142d4e11a0a18bbcc4fd4932cfe4439
parent 8c3888b3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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");