• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Home Facet.
29      */
openHomeFacet()30     void openHomeFacet();
31 
32     /**
33      * Open Maps Facet.
34      */
openMapsFacet()35     void openMapsFacet();
36 
37     /**
38      * Open Media Facet.
39      */
openMediaFacet()40     void openMediaFacet();
41 
42     /**
43      * Open Media Facet.
44      * @param appName open app from media facet.
45      */
openMediaFacet(String appName)46     void openMediaFacet(String appName);
47 
48     /**
49      * Open Dial Facet.
50      */
openDialFacet()51     void openDialFacet();
52 
53     /**
54      * Open App Grid Facet.
55      */
openAppGridFacet()56     void openAppGridFacet();
57 
58     /**
59      * Open Notification Facet.
60      */
openNotificationFacet()61     void openNotificationFacet();
62 
63     /**
64      * Open Google Assistant Facet.
65      */
openAssistantFacet()66     void openAssistantFacet();
67 
68     /** This method is to open Bluetooth Audio application */
openBluetoothAudioApp()69     void openBluetoothAudioApp();
70 
71     /** This method is to open Google Play Store application */
openGooglePlayStore()72     void openGooglePlayStore();
73 
74     /** Open Quick Settings. */
openQuickSettings()75     void openQuickSettings();
76 
77     /**
78      * Click on left HVAC.
79      */
clickLeftHvac()80     void clickLeftHvac();
81 
82     /**
83      * Click on right HVAC.
84      */
clickRightHvac()85     void clickRightHvac();
86 
87     /**
88      * This method is to check if an application is visible on UI
89      *
90      * @param appName check app from all apps facet.
91      */
checkApplicationExists(String appName)92     boolean checkApplicationExists(String appName);
93 
94     /**
95      * This method is to open an application if it appears on UI
96      *
97      * It throws an exception when the target application is not found
98      *
99      * @param appName application to be opened.
100      */
openApp(String appName)101     void openApp(String appName);
102 
103     /** This method is to open notifications */
openNotifications()104     void openNotifications();
105 
106     /** This method is to navigate to device home */
pressHome()107     void pressHome();
108 }
109