diff options
author | Thomas Guillem <thomas@gllm.fr> | 2014-11-02 16:52:43 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-19 23:32:24 +0200 |
commit | aff070bcbb771a5096f02b60c84aacfde601e043 (patch) | |
tree | f5a14d6bceb131804604776a9e380a0440f8f2af /android | |
parent | 5af2632d4f1f560e9020a2063c84eab12579458f (diff) |
android: add LogListener
A Java object to send logs on the android side.
Diffstat (limited to 'android')
-rw-r--r-- | android/src/Bridge.java | 8 | ||||
-rw-r--r-- | android/src/Main.java | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/android/src/Bridge.java b/android/src/Bridge.java index be8eabb6b..fad919204 100644 --- a/android/src/Bridge.java +++ b/android/src/Bridge.java @@ -25,6 +25,12 @@ import android.content.Context; * Bridge to native code. */ public class Bridge { - public static native void run(Context context); + + /* used by jni */ + public interface LogListener { + public void onLog(int priority, String msg); + } + + public static native void run(Context context, LogListener logListener); public static native void shutdown(); } diff --git a/android/src/Main.java b/android/src/Main.java index da64a1976..816b62cdb 100644 --- a/android/src/Main.java +++ b/android/src/Main.java @@ -69,7 +69,7 @@ public class Main extends Activity implements Runnable { } @Override public void run() { - Bridge.run(this); + Bridge.run(this, null); quitHandler.sendMessage(quitHandler.obtainMessage()); } } |