From 88a5b80decfad26ae2dd152d08cbd35c527658a2 Mon Sep 17 00:00:00 2001 From: Tongfei Guo Date: Wed, 20 Nov 2019 18:20:24 -0800 Subject: Expand generic app helper interface to allow launch action. Bug: 144052618 Test: build and run test Change-Id: Iabfd6e5497ac519db58279d695bee54c661483b9 (cherry picked from commit 0ab740b8d8b2b6b0c44173f65e692bda281f4fab) --- .../android/platform/helpers/IAutoGenericAppHelper.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoGenericAppHelper.java b/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoGenericAppHelper.java index 842c5db6b..060004ba5 100644 --- a/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoGenericAppHelper.java +++ b/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoGenericAppHelper.java @@ -16,18 +16,27 @@ package android.platform.helpers; +import java.util.Map; + +/** + * An interface to open any applications. One of the member methods must be invoked after creating + * an instance of this class. + */ public interface IAutoGenericAppHelper extends IAppHelper, Scrollable { /** * Set the package to open. The application will be opened using the info activity or launcher - * activity of the package that has been injected here. Either setPackage or setLaunchActivity - * needs to be invoked after creating an instance of this class. + * activity of the package that has been injected here. */ void setPackage(String pkg); /** * Set the launch activity. The application will be opened directly using the provided activity. - * Either setPackage or setLaunchActivity needs to be invoked after creating an instance of this - * class. */ void setLaunchActivity(String pkg); + + /** + * Set the launch action. The application will be opened using the provided launch action with + * given extra arguments. + */ + void setLaunchAction(String action, Map extraArgs); } -- cgit v1.2.3