| Index: libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java |
| diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java |
| index f3d72d8fcd5fb844e30ee7c6b77be9986f149884..720223e4d5a6363e2c5623722a5159c293bc7e0a 100644 |
| --- a/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java |
| +++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java |
| @@ -19,9 +19,8 @@ package org.adblockplus.libadblockplus; |
| import java.util.List; |
| -public final class FilterEngine implements Disposable |
| +public final class FilterEngine |
| { |
| - private final Disposer disposer; |
| protected final long ptr; |
| static |
| @@ -32,19 +31,14 @@ public final class FilterEngine implements Disposable |
| public static enum ContentType |
| { |
| - OTHER, SCRIPT, IMAGE, STYLESHEET, OBJECT, SUBDOCUMENT, DOCUMENT, XMLHTTPREQUEST, |
| - OBJECT_SUBREQUEST, FONT, MEDIA |
| + OTHER, SCRIPT, IMAGE, STYLESHEET, OBJECT, SUBDOCUMENT, DOCUMENT, WEBSOCKET, |
| + WEBRTC, PING, XMLHTTPREQUEST, OBJECT_SUBREQUEST, MEDIA, FONT, GENERICBLOCK, |
| + ELEMHIDE, GENERICHIDE |
| } |
| - public FilterEngine(final JsEngine jsEngine, final IsAllowedConnectionCallback isSubscriptionDownloadAllowedCallback) |
| + FilterEngine(long jniPlatformPtr) |
| { |
| - this.ptr = ctor(jsEngine.ptr, isSubscriptionDownloadAllowedCallback); |
| - this.disposer = new Disposer(this, new DisposeWrapper(this.ptr)); |
| - } |
| - |
| - public FilterEngine(final JsEngine jsEngine) |
| - { |
| - this(jsEngine, null); |
| + this.ptr = jniPlatformPtr; |
| } |
| public boolean isFirstRun() |
| @@ -202,32 +196,8 @@ public final class FilterEngine implements Disposable |
| updateFiltersAsync(this.ptr, subscriptionUrl); |
| } |
| - @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(long jsEnginePtr, IsAllowedConnectionCallback isSubscriptionDownloadAllowedCallback); |
| - |
| private final static native boolean isFirstRun(long ptr); |
| private final static native Filter getFilter(long ptr, String text); |
| @@ -283,6 +253,4 @@ public final class FilterEngine implements Disposable |
| private final static native String getAcceptableAdsSubscriptionURL(long ptr); |
| private final static native void updateFiltersAsync(long ptr, String subscriptionUrl); |
| - |
| - private final static native void dtor(long ptr); |
| } |