|
|
@ -61,23 +61,16 @@ Android_GetNativeObject |
|
|
|
|
|
|
|
|
|
|
|
void *Android_GetNativeObject( const char *name ) |
|
|
|
void *Android_GetNativeObject( const char *name ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static const char *availObjects[] = { "JNIEnv", "ActivityClass", NULL }; |
|
|
|
if( !strcasecmp( name, "JNIEnv" ) ) |
|
|
|
void *object = NULL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( !name ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
object = (void *)availObjects; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if( !strcasecmp( name, "JNIEnv" ) ) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
object = (void *)jni.env; |
|
|
|
return (void *)jni.env; |
|
|
|
} |
|
|
|
} |
|
|
|
else if( !strcasecmp( name, "ActivityClass" ) ) |
|
|
|
else if( !strcasecmp( name, "ActivityClass" ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
object = (void *)jni.actcls; |
|
|
|
return (void *)jni.actcls; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return object; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|