summaryrefslogtreecommitdiffstats
path: root/src/com/mcserver
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-18 00:20:35 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-18 00:20:35 +0200
commitc40af4c4ab0541638a6079a97c601a774ed65d02 (patch)
tree425de85573c9ca79f0216224fa3bbe69d5ea0930 /src/com/mcserver
parentFixed an assert in bucket placement (diff)
downloadcuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar.gz
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar.bz2
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar.lz
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar.xz
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.tar.zst
cuberite-c40af4c4ab0541638a6079a97c601a774ed65d02.zip
Diffstat (limited to '')
-rw-r--r--src/com/mcserver/MCServerActivity.java39
1 files changed, 30 insertions, 9 deletions
diff --git a/src/com/mcserver/MCServerActivity.java b/src/com/mcserver/MCServerActivity.java
index f7bfc76e3..ff1a4fae2 100644
--- a/src/com/mcserver/MCServerActivity.java
+++ b/src/com/mcserver/MCServerActivity.java
@@ -2,35 +2,42 @@ package com.mcserver;
import android.app.Activity;
import android.os.Bundle;
+import android.util.Log;
import android.view.KeyEvent;
public class MCServerActivity extends Activity {
+ MainThread mThread = null;
+
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
- MainThread p = new MainThread();
- p.start();
+ mThread = new MainThread();
+ mThread.start();
}
- public boolean onKeyDown(int keyCode, KeyEvent event)
- {
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode==KeyEvent.KEYCODE_BACK)
{
//android.os.Process.killProcess(android.os.Process.myPid());
- NativeCleanUp();
+ mThread.NativeCleanUp();
return super.onKeyDown(keyCode, event);
}
return false;
}
+ public void AddToLog( String logMessage ) {
+
+ }
+
static {
System.loadLibrary("mcserver");
}
- private static native void NativeCleanUp();
+
+
}
@@ -39,9 +46,23 @@ class MainThread extends Thread {
MainThread() {
}
+ public void AddToLog( String logMessage ) {
+ //Log.d("MCServer", "Add to log: " + logMessage);
+ }
+
+ public void TestTest(){
+ Log.d("MCServer", "in testtest");
+ }
+
public void run() {
NativeOnCreate();
}
-
- private static native void NativeOnCreate();
-} \ No newline at end of file
+ public native void NativeOnCreate();
+ public native void NativeCleanUp();
+}
+
+
+
+
+
+