Removing DeferredHandler and using a simple Handler to post callbacks

DeferredHandler was added when we were posting each icon separately,
to prevent starvation. But since then we have moved to binding batct
items during bind.

Also fixing waitForIdle not waiting the second time. waitForIdle was
using a global variable to maintain state, and was not waiting properly
when its called the second time before binding deep shortcuts

Original Change-Id: I9c1289cb3bfb74f86e53ec7ac6dd76bb39666b2d

Change-Id: I9e6b3ae65fbd3aec3a46092efc5249c4525efedf
This commit is contained in:
Sunny Goyal
2017-02-14 15:03:45 -08:00
parent 7adec0ea5b
commit b265ba7449
9 changed files with 136 additions and 233 deletions

View File

@@ -18,14 +18,14 @@ package com.android.launcher3;
import android.os.Looper;
import com.android.launcher3.util.LooperExecuter;
import com.android.launcher3.util.LooperExecutor;
/**
* An executor service that executes its tasks on the main thread.
*
* Shutting down this executor is not supported.
*/
public class MainThreadExecutor extends LooperExecuter {
public class MainThreadExecutor extends LooperExecutor {
public MainThreadExecutor() {
super(Looper.getMainLooper());