Index: libadblockplus-android/jni/JniJsEngine.cpp |
diff --git a/libadblockplus-android/jni/JniJsEngine.cpp b/libadblockplus-android/jni/JniJsEngine.cpp |
index d30cb3376830a5ea43fea013a4e6c4b08b58bea4..ad170a7ce58714005c52922b79b187a949cd92ab 100644 |
--- a/libadblockplus-android/jni/JniJsEngine.cpp |
+++ b/libadblockplus-android/jni/JniJsEngine.cpp |
@@ -136,6 +136,18 @@ static void JNICALL JniSetDefaultFileSystem(JNIEnv* env, jclass clazz, jlong ptr |
CATCH_AND_THROW(env) |
} |
+static void JNICALL JniSetFileSystem(JNIEnv* env, jclass clazz, jlong ptr, jlong fileSystemPtr) |
+{ |
+ AdblockPlus::JsEnginePtr& engine = *JniLongToTypePtr<AdblockPlus::JsEnginePtr>(ptr); |
+ |
+ try |
+ { |
+ AdblockPlus::FileSystemPtr fileSystem = *JniLongToTypePtr<AdblockPlus::FileSystemPtr>(fileSystemPtr); |
+ engine->SetFileSystem(fileSystem); |
+ } |
+ CATCH_AND_THROW(env) |
+} |
+ |
static void JNICALL JniSetDefaultWebRequest(JNIEnv* env, jclass clazz, jlong ptr) |
{ |
AdblockPlus::JsEnginePtr& engine = *JniLongToTypePtr<AdblockPlus::JsEnginePtr>(ptr); |
@@ -242,6 +254,7 @@ static JNINativeMethod methods[] = |
{ (char*)"evaluate", (char*)"(JLjava/lang/String;Ljava/lang/String;)" TYP("JsValue"), (void*)JniEvaluate }, |
+ { (char*)"setFileSystem", (char*)"(JJ)V", (void*)JniSetFileSystem }, |
{ (char*)"setDefaultFileSystem", (char*)"(JLjava/lang/String;)V", (void*)JniSetDefaultFileSystem }, |
{ (char*)"setLogSystem", (char*)"(JJ)V", (void*)JniSetLogSystem }, |
{ (char*)"setDefaultLogSystem", (char*)"(J)V", (void*)JniSetDefaultLogSystem }, |