Index: jni/abpEngine.cpp |
=================================================================== |
--- a/jni/abpEngine.cpp |
+++ b/jni/abpEngine.cpp |
@@ -41,6 +41,10 @@ |
JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_refreshSubscription(JNIEnv *pEnv, jobject, jstring url); |
JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_actualizeSubscriptionStatus(JNIEnv *pEnv, jobject, jstring url); |
JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_setAcceptableAdsEnabled(JNIEnv *pEnv, jobject, jboolean enabled); |
+ JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_setNotifiedAboutAcceptableAds( |
+ JNIEnv* env, jobject object, jboolean notified); |
+ JNIEXPORT jboolean JNICALL Java_org_adblockplus_android_ABPEngine_isNotifiedAboutAcceptableAds( |
+ JNIEnv* env, jobject object); |
JNIEXPORT jstring JNICALL Java_org_adblockplus_android_ABPEngine_getDocumentationLink( |
JNIEnv *env, jobject object); |
JNIEXPORT jboolean JNICALL Java_org_adblockplus_android_ABPEngine_matches(JNIEnv *pEnv, jobject, jstring url, jstring contentType, jstring documentUrl); |
@@ -464,6 +468,19 @@ |
return env->NewStringUTF(documentationLink.c_str()); |
} |
+JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_setNotifiedAboutAcceptableAds( |
+ JNIEnv* env, jobject object, jboolean notified) |
+{ |
+ AdblockPlus::JsEnginePtr jsEngine = filterEngine->GetJsEngine(); |
+ filterEngine->SetPref("notified_about_acceptable_ads", jsEngine->NewValue(notified)); |
Wladimir Palant
2013/11/26 11:01:02
This won't do anything, prefs that aren't defined
Felix Dahlke
2013/11/26 13:59:31
Done. Wasn't aware of that. IMO, it doesn't make s
|
+} |
+ |
+JNIEXPORT jboolean JNICALL Java_org_adblockplus_android_ABPEngine_isNotifiedAboutAcceptableAds( |
+ JNIEnv* env, jobject object) |
+{ |
+ return filterEngine->GetPref("notified_about_acceptable_ads")->AsBool(); |
+} |
+ |
JNIEXPORT jboolean JNICALL Java_org_adblockplus_android_ABPEngine_matches(JNIEnv *pEnv, jobject, jstring url, jstring contentType, jstring documentUrl) |
{ |
try |