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

Commit f28629a4 authored by Jon Miranda's avatar Jon Miranda
Browse files

Ignore tasks if the LauncherModel is still pending.

The tasks will be enqueued after the model is loaded when it
gets to the final state.

Bug: 31509386
Change-Id: Id72aaedb025a91a49b25e1ef103cc1976d603b21
parent f55ad3d4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1800,6 +1800,12 @@ public class LauncherModel extends BroadcastReceiver
    }

    void enqueueModelUpdateTask(BaseModelUpdateTask task) {
        if (!mModelLoaded && mLoaderTask == null) {
            if (DEBUG_LOADERS) {
                Log.d(TAG, "enqueueModelUpdateTask Ignoring task since loader is pending=" + task);
            }
            return;
        }
        task.init(this);
        runOnWorkerThread(task);
    }