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

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

Issue 29524565: Issue 5556 - remove LogSystem setters (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: address comments Created Aug. 24, 2017, 1:38 p.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/JsEngine.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
index e2f9c091fce60d7d64c25d60c517c26657bca8ae..80b4cfd64fb14ae0df1238eaa6d950b720ad5595 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
@@ -30,9 +30,14 @@ public final class JsEngine implements Disposable
registerNatives();
}
+ public JsEngine(final AppInfo appInfo, final LogSystem logSystem)
+ {
+ this(ctor(appInfo, logSystem != null ? logSystem.ptr : 0));
+ }
+
public JsEngine(final AppInfo appInfo)
{
- this(ctor(appInfo));
+ this(appInfo, null);
}
protected JsEngine(final long ptr)
@@ -83,16 +88,6 @@ public final class JsEngine implements Disposable
setDefaultFileSystem(this.ptr, basePath);
}
- public void setDefaultLogSystem()
- {
- setDefaultLogSystem(this.ptr);
- }
-
- public void setLogSystem(final LogSystem logSystem)
- {
- setLogSystem(this.ptr, logSystem.ptr);
- }
-
public void setWebRequest(final WebRequest webRequest)
{
setWebRequest(this.ptr, webRequest.ptr);
@@ -137,7 +132,7 @@ public final class JsEngine implements Disposable
private final static native void registerNatives();
- private final static native long ctor(AppInfo appInfo);
+ private final static native long ctor(AppInfo appInfo, long logSystemPtr);
private final static native void setEventCallback(long ptr, String eventName, long callback);
@@ -149,10 +144,6 @@ public final class JsEngine implements Disposable
private final static native void setDefaultFileSystem(long ptr, String basePath);
- private final static native void setLogSystem(long ptr, long logSystemPtr);
-
- private final static native void setDefaultLogSystem(long ptr);
-
private final static native void setWebRequest(long ptr, long webRequestPtr);
private final static native JsValue newValue(long ptr, long value);

Powered by Google App Engine
This is Rietveld