Index: jni/JniUpdaterCallback.cpp |
diff --git a/jni/JniUpdaterCallback.cpp b/jni/JniUpdaterCallback.cpp |
index c50196c6050d26378bbdbb08c30a366ce53d5295..ad28194e34a418238700bc3fb1efd759c8db4da4 100644 |
--- a/jni/JniUpdaterCallback.cpp |
+++ b/jni/JniUpdaterCallback.cpp |
@@ -17,18 +17,18 @@ |
#include "JniCallbacks.h" |
-AdblockPlus::Android::JniUpdaterCallback::JniUpdaterCallback(JNIEnv* env, jobject callbackObject) : |
- JniCallbackBase(env, callbackObject) |
+JniUpdaterCallback::JniUpdaterCallback(JNIEnv* env, jobject callbackObject) |
+ : JniCallbackBase(env, callbackObject) |
{ |
} |
-AdblockPlus::Android::JniUpdaterCallback::~JniUpdaterCallback() |
+JniUpdaterCallback::~JniUpdaterCallback() |
{ |
} |
-void AdblockPlus::Android::JniUpdaterCallback::Callback(const std::string& arg) |
+void JniUpdaterCallback::Callback(const std::string& arg) |
{ |
- AdblockPlus::Android::JNIEnvAcquire env(GetJavaVM()); |
+ JNIEnvAcquire env(GetJavaVM()); |
jclass clazz = env->GetObjectClass(GetCallbackObject()); |
jmethodID method = env->GetMethodID(clazz, "updateCallback", "(Ljava/lang/String;)V"); |
@@ -46,20 +46,21 @@ static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jobject callbackObject) |
{ |
TRY |
{ |
- return AdblockPlus::Android::JniPtr2Long(new AdblockPlus::Android::JniUpdaterCallback(env, callbackObject)); |
+ return JniPtrToLong(new JniUpdaterCallback(env, callbackObject)); |
} |
CATCH_THROW_AND_RETURN(env, 0) |
} |
static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr) |
{ |
- delete AdblockPlus::Android::JniLong2TypePtr<AdblockPlus::Android::JniUpdaterCallback>(ptr); |
+ delete JniLongToTypePtr<JniUpdaterCallback>(ptr); |
} |
static JNINativeMethod methods[] = |
{ |
-{ (char*)"ctor", (char*)"(Ljava/lang/Object;)J", (void*)JniCtor }, |
-{ (char*)"dtor", (char*)"(J)V", (void*)JniDtor }, }; |
+ { (char*)"ctor", (char*)"(Ljava/lang/Object;)J", (void*)JniCtor }, |
+ { (char*)"dtor", (char*)"(J)V", (void*)JniDtor } |
+}; |
extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_android_api_UpdaterCallback_registerNatives(JNIEnv *env, jclass clazz) |
{ |