summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2010-01-06 10:16:55 -0800
committerYing Wang <wangying@google.com>2010-01-06 10:16:55 -0800
commit9c7692aabbf28554810f440fc7ff60fc9c335dc9 (patch)
tree806524c400c93144eb0ba4315d0097ac99780fdf /cmds
parent48f0d8993b5e871dd2695e983266aa655801769e (diff)
downloadandroid_development-9c7692aabbf28554810f440fc7ff60fc9c335dc9.tar.gz
android_development-9c7692aabbf28554810f440fc7ff60fc9c335dc9.tar.bz2
android_development-9c7692aabbf28554810f440fc7ff60fc9c335dc9.zip
Set ro.monkey if it's not set yet.
http://b/issue?id=1681101
Diffstat (limited to 'cmds')
-rw-r--r--cmds/monkey/src/com/android/commands/monkey/Monkey.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/cmds/monkey/src/com/android/commands/monkey/Monkey.java b/cmds/monkey/src/com/android/commands/monkey/Monkey.java
index a3d6d5d20..7109bc6c4 100644
--- a/cmds/monkey/src/com/android/commands/monkey/Monkey.java
+++ b/cmds/monkey/src/com/android/commands/monkey/Monkey.java
@@ -301,14 +301,8 @@ public class Monkey {
* @param args The command-line arguments
*/
public static void main(String[] args) {
- // Tell the system that Monkey is running.
- SystemProperties.set("monkey.running", "true");
- // Add a hook to tell the system that Monkey has finished running.
- Runtime.getRuntime().addShutdownHook(new Thread() {
- public void run() {
- SystemProperties.set("monkey.running", null);
- }
- });
+ // Set ro.monkey if it's not set yet.
+ SystemProperties.set("ro.monkey", "true");
int resultCode = (new Monkey()).run(args);
System.exit(resultCode);