Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java

Issue 29533572: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created Sept. 1, 2017, 9:41 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java
index 6afaf4120113306bc2323984326f9e8e6a11662b..3811cc0bb1c0c0a2237e3a3dc72051bf66fb2213 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/IsAllowedConnectionCallback.java
@@ -17,50 +17,7 @@
package org.adblockplus.libadblockplus;
-public abstract class IsAllowedConnectionCallback implements Disposable
+public interface IsAllowedConnectionCallback
{
- private final Disposer disposer;
- protected final long ptr;
-
- static
- {
- System.loadLibrary("adblockplus-jni");
- registerNatives();
- }
-
- public IsAllowedConnectionCallback()
- {
- this.ptr = ctor(this);
- this.disposer = new Disposer(this, new DisposeWrapper(this.ptr));
- }
-
- public abstract boolean isConnectionAllowed(String connection);
-
- @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);
+ boolean isConnectionAllowed(String connection);
}

Powered by Google App Engine
This is Rietveld