summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Shan Emily Lau <yslau@google.com>2010-06-24 15:42:29 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-06-24 15:42:29 -0700
commita96f73a6832174b0d4b0632e60a9965c188e4b22 (patch)
tree0d6f1eb0aeef6fcccbd1d58fac5838cd9e892273
parent52cc9b99116aa87b8e8fe306e97d59f66cdce0b5 (diff)
parent1a132581a5ce6188989d8522d227392c05cb42f6 (diff)
downloaddevelopment-a96f73a6832174b0d4b0632e60a9965c188e4b22.tar.gz
am 1a132581: 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
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into froyo-plus-aosp * commit '1a132581a5ce6188989d8522d227392c05cb42f6': 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.
-rw-r--r--cmds/monkey/src/com/android/commands/monkey/MonkeyPowerEvent.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmds/monkey/src/com/android/commands/monkey/MonkeyPowerEvent.java b/cmds/monkey/src/com/android/commands/monkey/MonkeyPowerEvent.java
index 670aa7e51..f2112a40e 100644
--- a/cmds/monkey/src/com/android/commands/monkey/MonkeyPowerEvent.java
+++ b/cmds/monkey/src/com/android/commands/monkey/MonkeyPowerEvent.java
@@ -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();