Moving some calls off the UI thread

This saves ~5ms in onNewIntent

Bug: 67305604
Change-Id: Ic97727b1c526e50bd3c8a1d8f511e1d7fd5e05e7
This commit is contained in:
Sunny Goyal
2017-10-02 12:45:10 -07:00
parent ec21a599f4
commit 326403e958
6 changed files with 105 additions and 39 deletions

View File

@@ -32,10 +32,10 @@ import android.view.View;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppWidgetHostView;
import com.android.launcher3.LauncherModel;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.util.UiThreadHelper;
import java.nio.ByteBuffer;
@@ -151,7 +151,7 @@ public class DragPreviewProvider {
}
mOutlineGeneratorCallback = new OutlineGeneratorCallback(preview);
new Handler(LauncherModel.getWorkerLooper()).postAtFrontOfQueue(mOutlineGeneratorCallback);
new Handler(UiThreadHelper.getBackgroundLooper()).post(mOutlineGeneratorCallback);
}
protected static Rect getDrawableBounds(Drawable d) {