1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.platform.helpers; 18 19 import java.util.Map; 20 21 /** 22 * An interface to open any applications. One of the member methods must be invoked after creating 23 * an instance of this class. 24 */ 25 public interface IAutoGenericAppHelper extends IAppHelper, Scrollable { 26 /** 27 * Set the package to open. The application will be opened using the info activity or launcher 28 * activity of the package that has been injected here. 29 */ setPackage(String pkg)30 void setPackage(String pkg); 31 32 /** 33 * Set the launch activity. The application will be opened directly using the provided activity. 34 */ setLaunchActivity(String pkg)35 void setLaunchActivity(String pkg); 36 37 /** 38 * Set the launch action. The application will be opened using the provided launch action with 39 * given extra arguments. 40 */ setLaunchAction(String action, Map<String, String> extraArgs)41 void setLaunchAction(String action, Map<String, String> extraArgs); 42 } 43