Removing AM.getTasks call on UI thread during touch down

We maintain a cached task queue using TaskStackChangeListener.
It keeps the top RunningTaskInfo partially in sync with platfrom:
   taskInfo is only initialized when the top task changes
   but not when there are changes within the task itself.

Bug: 214581894
Bug: 220742398
Test: Manual and presubmit
Change-Id: Ifafde574040c03435b78f044350c45f3b49c4bcb
This commit is contained in:
Sunny Goyal
2022-04-12 22:56:24 -07:00
parent 998c47e594
commit 013a8a75ab
16 changed files with 399 additions and 335 deletions

View File

@@ -48,8 +48,8 @@ import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.touch.SingleAxisSwipeDetector;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.TaskUtils;
import com.android.quickstep.TopTaskTracker;
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.AssistantUtilities;
import com.android.quickstep.util.OverviewToHomeAnim;
import com.android.quickstep.views.RecentsView;
@@ -112,7 +112,8 @@ public class NavBarToHomeTouchController implements TouchController,
return true;
}
if (FeatureFlags.ASSISTANT_GIVES_LAUNCHER_FOCUS.get()
&& AssistantUtilities.isExcludedAssistantRunning()) {
&& TopTaskTracker.INSTANCE.get(mLauncher).getCachedTopTask(false)
.isExcludedAssistant()) {
return true;
}
return false;