• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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 public interface IAutoMediaHelper extends IAppHelper {
20     /**
21      * Setup expectations: media app is open
22      *
23      * This method is used to play media.
24      */
playMedia()25     void playMedia();
26 
27     /**
28      * Setup expectations: on home screen.
29      *
30      * This method is used to play media from home screen.
31      */
playPauseMediaFromHomeScreen()32     void playPauseMediaFromHomeScreen();
33 
34     /**
35      * Setup expectations: media app is open.
36      *
37      * This method is used to pause media.
38      */
pauseMedia()39     void pauseMedia();
40 
41     /**
42      * Setup expectations: media app is open.
43      *
44      * This method is used to select next track.
45      */
clickNextTrack()46     void clickNextTrack();
47 
48     /**
49      * Setup expectations: on home screen.
50      *
51      * This method is used to select next track from home screen.
52      */
clickNextTrackFromHomeScreen()53     void clickNextTrackFromHomeScreen();
54 
55     /**
56      * Setup expectations: media app is open.
57      *
58      * This method is used to select previous track.
59      */
clickPreviousTrack()60     void clickPreviousTrack();
61 
62     /**
63      * Setup expectations: on home screen.
64      *
65      * This method is used to select previous track from home screen.
66      */
clickPreviousTrackFromHomeScreen()67     void clickPreviousTrackFromHomeScreen();
68 
69     /**
70      * Setup expectations: media app is open.
71      *
72      * This method is used to shuffle tracks.
73      */
clickShuffleAll()74     void clickShuffleAll();
75 
76     /**
77      * Setup expectations: media app is open.
78      *
79      * This method is used to click on nth instance among the visible menu items
80      *
81      * @param - instance is the index of the menu item (starts from 0)
82      */
clickMenuItem(int instance)83     void clickMenuItem(int instance);
84 
85     /**
86      * Setup expectations: media app is open.
87      *
88      * This method is used to open Folder Menu with menuOptions.
89      * Example - openMenu->Folder->Mediafilename->trackName
90      *           openMenuWith(Folder,mediafilename,trackName);
91      *
92      * @param - menuOptions used to pass multiple level of menu options in one go.
93      */
openMenuWith(String... menuOptions)94     void openMenuWith(String... menuOptions);
95 
96     /**
97      * Setup expectations: media app is open.
98      *
99      * This method is used to used to open mediafilename from now playing list.
100      *
101      *  @param - trackName - media to be played.
102      */
openNowPlayingWith(String trackName)103     void openNowPlayingWith(String trackName);
104 
105     /**
106      * Setup expectations: Media app is open.
107      *
108      * @return to get current playing track name.
109      */
getMediaTrackName()110     String getMediaTrackName();
111 
112     /**
113      * Setup expectations: on home screen.
114      *
115      * @return to get current playing track name from home screen.
116      */
getMediaTrackNameFromHomeScreen()117     String getMediaTrackNameFromHomeScreen();
118 
119     /**
120      * Setup expectations: Media app is open. User navigates to sub-page of the Media Player
121      *
122      * This method is to go back to the Media Player main page from any sub-page.
123      */
goBackToMediaHomePage()124     void goBackToMediaHomePage();
125 
126     /**
127      * This method is used to check if media is currently playing Returns true if media is playing
128      * else returns false
129      */
isPlaying()130     boolean isPlaying();
131 }
132