Moving removing task after QS to a background thread.

Blocking binder call was creating jank.

Test: manual, presubmit
Bug: 173467481, 173072373
Change-Id: Ib19d2a97ed8cf3e9763008b042ef48d89532cb58
This commit is contained in:
vadimt
2020-12-04 14:18:52 -08:00
parent 2f4654ee04
commit 1e71ba5b98
@@ -16,6 +16,7 @@
package com.android.quickstep;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import android.graphics.Rect;
@@ -96,8 +97,8 @@ public class RecentsAnimationController {
* {@link RecentsAnimationCallbacks#onTaskAppeared(RemoteAnimationTargetCompat)}}.
*/
@UiThread
public boolean removeTaskTarget(@NonNull RemoteAnimationTargetCompat target) {
return mController.removeTask(target.taskId);
public void removeTaskTarget(@NonNull RemoteAnimationTargetCompat target) {
THREAD_POOL_EXECUTOR.execute(() -> mController.removeTask(target.taskId));
}
@UiThread