#include "oic_string.h"
#include "org_iotivity_ca_CaIpInterface.h"
-#define TAG "IP_MONITOR"
+#define TAG "OIC_CA_IP_MONITOR"
static CAInterface_t *CANewInterfaceItem(int index, const char *name, int family,
uint32_t addr, int flags);
return CA_STATUS_FAILED;
}
- jclass cls_Context = (*env)->FindClass(env, "android/content/Context");
- if (!cls_Context)
- {
- OIC_LOG(ERROR, TAG, "Could not get context object class");
- return CA_STATUS_FAILED;
- }
+ jmethodID mid_getApplicationContext = CAGetJNIMethodID(env, "android/content/Context",
+ "getApplicationContext",
+ "()Landroid/content/Context;");
- jmethodID mid_getApplicationContext = (*env)->GetMethodID(env, cls_Context,
- "getApplicationContext",
- "()Landroid/content/Context;");
if (!mid_getApplicationContext)
{
OIC_LOG(ERROR, TAG, "Could not get getApplicationContext method");