Wait for the Launcher activity to bind to TIS before animating

- Mainly a test issue where we destroy the activity and immediately
  enter overview without preloading launcher.  In this case, the task
  bar does not animate due to the delayed cycled of activity create
  -> bind service -> service connected -> taskbar ui controller init.
  As a result, the bar can occlude content from Launcher preventing
  the test from finding the overview actions.

  Instead, in cases where we need to animate with launcher, we wait
  for Launcher to be created (generally already the case) and the
  service has bound before proceeding.

Bug: 189807374
Bug: 204891006
Test: atest NexusLauncherTests:com.android.quickstep.StartLauncherViaGestureTests
Change-Id: I2cfccae67ac0e5a591639c6c99df032451dae16d
This commit is contained in:
Vinit Nayak authored and Winson Chung committed 2021-12-15 00:53:54 +00:00
1 parent be0360c6d8
commit 8581dfc218
5 files changed
+89 -32

No files matched your search

@@ -320,6 +320,11 @@ public abstract class BaseQuickstepLauncher extends Launcher
mOverviewCommandHelper = binder.getOverviewCommandHelper();
}
@Override
public void runOnBindToTouchInteractionService(Runnable r) {
mTISBindHelper.runOnBindToTouchInteractionService(r);
}
private void initUnfoldTransitionProgressProvider() {
final UnfoldTransitionConfig config = UnfoldTransitionFactory.createConfig(this);
if (config.isEnabled()) {