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 package android.support.test.launcherhelper; 17 18 import android.app.Instrumentation; 19 20 public interface IAutoLauncherStrategy extends ILauncherStrategy { 21 22 /** 23 * Sets an instance of instrumentation 24 */ setInstrumentation(Instrumentation instrumentation)25 void setInstrumentation(Instrumentation instrumentation); 26 27 /** 28 * Open Dial Facet. 29 */ openDialFacet()30 void openDialFacet(); 31 32 /** 33 * Open Media Facet. 34 * @param appName open app from media facet. 35 */ openMediaFacet(String appName)36 void openMediaFacet(String appName); 37 38 /** 39 * Open Settings Facet. 40 * @param appName open app from Settings facet. 41 */ openSettingsFacet(String appName)42 void openSettingsFacet(String appName); 43 44 /** 45 * Open Maps Facet. 46 * @param appName open app from maps facet. 47 */ openMapsFacet(String appName)48 void openMapsFacet(String appName); 49 50 /** 51 * Open Home Facet to select Dial/Media cards. 52 */ openHomeFacet()53 void openHomeFacet(); 54 55 /** 56 * Open Google Assistant Facet. 57 */ openAssistantFacet()58 void openAssistantFacet(); 59 60 /** 61 * This method is to check if an application is visible on UI 62 * 63 * @param appName check app from all apps facet. 64 */ checkApplicationExists(String appName)65 boolean checkApplicationExists(String appName); 66 67 /** 68 * This method is to open an application if it appears on UI 69 * 70 * It throws an exception when the target application is not found 71 * 72 * @param appName application to be opened. 73 */ openApp(String appName)74 void openApp(String appName); 75 } 76