--- /dev/null
+package org.openpandora.kill_android;
+
+import android.app.Activity;
+import android.os.Bundle;
+import java.net.Socket;
+import java.io.OutputStream;
+
+public class kill_android extends Activity
+{
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+
+ try
+ {
+ Socket s = new Socket("localhost", 36936);
+ OutputStream out = s.getOutputStream();
+ String msg = "quit";
+ byte[] msg_bytes = msg.getBytes("UTF8");
+
+ out.write(msg_bytes);
+// PrintWriter output = new PrintWriter(out);
+
+// output.println("quit");
+ s.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ android.os.Process.killProcess(android.os.Process.myPid());
+ }
+}
+
+// vim:expandtab:ts=4