• 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 
17 package android.platform.helpers;
18 
19 /**
20  * Helper class for functional tests of date & time
21  */
22 
23 import java.time.LocalDate;
24 
25 public interface IAutoDateTimeSettingsHelper extends IAppHelper {
26     /**
27      * Setup expectation: Date & time setting is open
28      *
29      * Set the device date
30      *
31      * @param date - input LocalDate object
32      */
setDate(LocalDate date)33     void setDate(LocalDate date);
34 
35     /**
36      * Setup expectation: Date & time setting is open
37      *
38      * Get the current date displayed on the UI in LocalDate object
39      */
getDate()40     LocalDate getDate();
41 
42     /**
43      * Setup expectation: Date & time setting is open
44      *
45      * Set the device time
46      *
47      * @param hour - input hour
48      * @param minute - input minute
49      * @param AM_PM - input am/pm
50      */
setTime(int hour, int minute, boolean is_am)51     void setTime(int hour, int minute, boolean is_am);
52 
53     /**
54      * Setup expectation: Date & time setting is open
55      *
56      * Get the current time displayed on the UI
57      * The return string format will match the UI format exactly
58      */
getTime()59     String getTime();
60 
61     /**
62      * Setup expectation: Date & time setting is open
63      *
64      * Set the device time zone
65      *
66      * @param timezone - city selected for timezone
67      */
setTimeZone(String timezone)68     void setTimeZone(String timezone);
69 
70     /**
71      * Setup expectation: Date & time setting is open
72      *
73      * Get the current timezone displayed on the UI
74      */
getTimeZone()75     String getTimeZone();
76 
77     /**
78      * Setup expectation: Date & time setting is open
79      *
80      * Check if the 24 hour format menu switch widget is toggoled on
81      */
isUseTwentyFourHourFormatSwitchWidgetOn()82     boolean isUseTwentyFourHourFormatSwitchWidgetOn();
83 
84     /**
85      * Setup expectation: Date & time setting is open
86      *
87      * Toggle on/off 24 hour format widget switch
88      */
toggleTwentyFourHourFormatSwitch()89     boolean toggleTwentyFourHourFormatSwitch();
90 }
91