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
This commit is contained in:
Jon Miranda
2017-02-23 15:12:42 -08:00
parent f55ad3d411
commit f28629a47b
@@ -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);
}