Don't rely on QuickstepLauncher instance for tests

Instead, bind to TouchInteractionService and use that binder to call into taskbar.

Test: TaplTestsTaskbar
Bug: 235986838
Change-Id: I222522bc53c9d1698542fbae52c37889f14abf41
This commit is contained in:
Tony Wickham
2022-08-26 20:43:51 -07:00
parent 7fb96a5305
commit b6f593042d
3 changed files with 45 additions and 45 deletions

View File

@@ -773,6 +773,24 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
mControllers.taskbarStashController.startUnstashHint(animateForward);
}
/**
* Enables manual taskbar stashing. This method should only be used for tests that need to
* stash/unstash the taskbar.
*/
@VisibleForTesting
public void enableManualStashingForTests(boolean enableManualStashing) {
mControllers.taskbarStashController.enableManualStashingForTests(enableManualStashing);
}
/**
* Unstashes the Taskbar if it is stashed. This method should only be used to unstash the
* taskbar at the end of a test.
*/
@VisibleForTesting
public void unstashTaskbarIfStashed() {
mControllers.taskbarStashController.onLongPressToUnstashTaskbar();
}
protected boolean isUserSetupComplete() {
return mIsUserSetupComplete;
}