Index: libadblockplus-android/src/org/adblockplus/libadblockplus/LogSystem.java |
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/LogSystem.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/LogSystem.java |
index a01f3f269a78b24480b0365f81ee9335930302c4..ccc983d015a316c5976b42ceb5c8f6690d4fbb95 100644 |
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/LogSystem.java |
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/LogSystem.java |
@@ -17,55 +17,12 @@ |
package org.adblockplus.libadblockplus; |
-public abstract class LogSystem implements Disposable |
+public interface LogSystem |
{ |
- private final Disposer disposer; |
- protected final long ptr; |
- |
- static |
- { |
- System.loadLibrary("adblockplus-jni"); |
- registerNatives(); |
- } |
- |
- public LogSystem() |
- { |
- this.ptr = ctor(this); |
- this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); |
- } |
- |
- public static enum LogLevel |
+ enum LogLevel |
{ |
TRACE, LOG, INFO, WARN, ERROR; |
} |
- public abstract void logCallback(LogLevel level, String message, String source); |
- |
- @Override |
- public void dispose() |
- { |
- this.disposer.dispose(); |
- } |
- |
- private final static class DisposeWrapper implements Disposable |
- { |
- private final long ptr; |
- |
- public DisposeWrapper(final long ptr) |
- { |
- this.ptr = ptr; |
- } |
- |
- @Override |
- public void dispose() |
- { |
- dtor(this.ptr); |
- } |
- } |
- |
- private final static native void registerNatives(); |
- |
- private final static native long ctor(Object callbackObject); |
- |
- private final static native void dtor(long ptr); |
+ void logCallback(LogLevel level, String message, String source); |
} |