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);