resolved conflicts for merge of e3b115d0 to master

This commit is contained in:
Ying Wang
2010-01-04 13:37:36 -08:00

View File

@@ -28,6 +28,7 @@ import android.os.Debug;
import android.os.Process; import android.os.Process;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.ServiceManager; import android.os.ServiceManager;
import android.os.SystemProperties;
import android.view.IWindowManager; import android.view.IWindowManager;
import java.io.BufferedReader; import java.io.BufferedReader;
@@ -336,6 +337,15 @@ public class Monkey {
* @param args The command-line arguments * @param args The command-line arguments
*/ */
public static void main(String[] args) { 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);
}
});
int resultCode = (new Monkey()).run(args); int resultCode = (new Monkey()).run(args);
System.exit(resultCode); System.exit(resultCode);
} }