You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
inform Java about apk path; allow specifying port for jdwp debugging with JDWP_LISTEN env; hackily work around onWindowFocusChanged being called at a time where it causes some apps to crash
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
// these macros are a bit hacky, since they deliberately assume that env exists and refers to the JNI env
|
||||
|
||||
#define _PTR(ptr)((void*)(intptr_t)ptr)
|
||||
#define _INTPTR(ptr)((jlong)(intptr_t)ptr)
|
||||
#define _PTR(ptr)((void*)(intptr_t)(ptr))
|
||||
#define _INTPTR(ptr)((jlong)(intptr_t)(ptr))
|
||||
#define _REF(obj)((*env)->NewGlobalRef(env, obj))
|
||||
#define _CLASS(object) ((*env)->GetObjectClass(env, object))
|
||||
#define _SUPER(object) ((*env)->GetSuperclass(env, object))
|
||||
@@ -24,6 +24,7 @@
|
||||
#define _GET_LONG_FIELD(object, field) ((*env)->GetLongField(env, object, _FIELD_ID(_CLASS(object), field, "J")))
|
||||
#define _SET_INT_FIELD(object, field, value) ((*env)->SetIntField(env, object, _FIELD_ID(_CLASS(object), field, "I"), value))
|
||||
#define _SET_STATIC_INT_FIELD(class, field, value) ((*env)->SetStaticIntField(env, class, _STATIC_FIELD_ID(class, field, "I"), value))
|
||||
#define _SET_STATIC_OBJ_FIELD(class, field, type, value) ((*env)->SetStaticObjectField(env, class, _STATIC_FIELD_ID(class, field, type), value))
|
||||
#define _GET_INT_FIELD(object, field) ((*env)->GetIntField(env, object, _FIELD_ID(_CLASS(object), field, "I")))
|
||||
#define _GET_BYTE_ARRAY_ELEMENTS(b_array) ((*env)->GetByteArrayElements(env, b_array, NULL))
|
||||
#define _RELEASE_BYTE_ARRAY_ELEMENTS(b_array, buffer_ptr) ((*env)->ReleaseByteArrayElements(env, b_array, buffer_ptr, 0))
|
||||
|
||||
Reference in New Issue
Block a user