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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user