File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
cmds/monkey/src/com/android/commands/monkey Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,17 @@ public class MonkeyPowerEvent extends MonkeyEvent {
37
37
private static ArrayList <ContentValues > mLogEvents = new ArrayList <ContentValues >();
38
38
private static final String TEST_SEQ_BEGIN = "AUTOTEST_SEQUENCE_BEGIN" ;
39
39
private static final String TEST_STARTED = "AUTOTEST_TEST_BEGIN" ;
40
+ private static final String TEST_DELAY_STARTED = "AUTOTEST_TEST_BEGIN_DELAY" ;
40
41
private static final String TEST_ENDED = "AUTOTEST_TEST_SUCCESS" ;
41
42
private static final String TEST_IDLE_ENDED = "AUTOTEST_IDLE_SUCCESS" ;
42
43
private static long mTestStartTime ;
43
44
44
45
private String mPowerLogTag ;
45
46
private String mTestResult ;
46
47
48
+ //10 secs for the screen to trun off after the usb notification
49
+ private static final long USB_DELAY_TIME = 10000 ;
50
+
47
51
public MonkeyPowerEvent (String powerLogTag , String powerTestResult ) {
48
52
super (EVENT_TYPE_ACTIVITY );
49
53
mPowerLogTag = powerLogTag ;
@@ -74,6 +78,10 @@ private void bufferLogEvent(String tag, String value) {
74
78
long lagTime = Long .parseLong (value );
75
79
tagTime = mTestStartTime + lagTime ;
76
80
tag = TEST_ENDED ;
81
+ } else if (tag .compareTo (TEST_DELAY_STARTED ) == 0 ) {
82
+ mTestStartTime = tagTime + USB_DELAY_TIME ;
83
+ tagTime = mTestStartTime ;
84
+ tag = TEST_STARTED ;
77
85
}
78
86
79
87
ContentValues event = new ContentValues ();
You can’t perform that action at this time.
0 commit comments