Merge "Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out." into froyo
This commit is contained in:
committed by
Android (Google) Code Review
commit
1a132581a5
@@ -37,6 +37,7 @@ public class MonkeyPowerEvent extends MonkeyEvent {
|
||||
private static ArrayList<ContentValues> mLogEvents = new ArrayList<ContentValues>();
|
||||
private static final String TEST_SEQ_BEGIN = "AUTOTEST_SEQUENCE_BEGIN";
|
||||
private static final String TEST_STARTED = "AUTOTEST_TEST_BEGIN";
|
||||
private static final String TEST_DELAY_STARTED = "AUTOTEST_TEST_BEGIN_DELAY";
|
||||
private static final String TEST_ENDED = "AUTOTEST_TEST_SUCCESS";
|
||||
private static final String TEST_IDLE_ENDED = "AUTOTEST_IDLE_SUCCESS";
|
||||
private static long mTestStartTime;
|
||||
@@ -44,6 +45,9 @@ public class MonkeyPowerEvent extends MonkeyEvent {
|
||||
private String mPowerLogTag;
|
||||
private String mTestResult;
|
||||
|
||||
//10 secs for the screen to trun off after the usb notification
|
||||
private static final long USB_DELAY_TIME = 10000;
|
||||
|
||||
public MonkeyPowerEvent(String powerLogTag, String powerTestResult) {
|
||||
super(EVENT_TYPE_ACTIVITY);
|
||||
mPowerLogTag = powerLogTag;
|
||||
@@ -74,6 +78,10 @@ public class MonkeyPowerEvent extends MonkeyEvent {
|
||||
long lagTime = Long.parseLong(value);
|
||||
tagTime = mTestStartTime + lagTime;
|
||||
tag = TEST_ENDED;
|
||||
} else if (tag.compareTo(TEST_DELAY_STARTED) == 0) {
|
||||
mTestStartTime = tagTime + USB_DELAY_TIME;
|
||||
tagTime = mTestStartTime;
|
||||
tag = TEST_STARTED;
|
||||
}
|
||||
|
||||
ContentValues event = new ContentValues();
|
||||
|
||||
Reference in New Issue
Block a user