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
implement instrumentation
This commit is contained in:
@@ -166,8 +166,11 @@ void set_up_handle_cache(JNIEnv *env)
|
||||
handle_cache.drawable.setBounds = _METHOD(handle_cache.drawable.class, "setBounds", "(IIII)V");
|
||||
|
||||
handle_cache.intent.class = _REF((*env)->FindClass(env, "android/content/Intent"));
|
||||
handle_cache.intent.constructor = _METHOD(handle_cache.intent.class, "<init>", "()V");
|
||||
handle_cache.intent.putExtraCharSequence = _METHOD(handle_cache.intent.class, "putExtra", "(Ljava/lang/String;Ljava/lang/CharSequence;)Landroid/content/Intent;");
|
||||
|
||||
handle_cache.instrumentation.class = _REF((*env)->FindClass(env, "android/app/Instrumentation"));
|
||||
|
||||
handle_cache.webview.class = _REF((*env)->FindClass(env, "android/webkit/WebView"));
|
||||
handle_cache.webview.internalGetAssetManager = _METHOD(handle_cache.webview.class, "internalGetAssetManager", "()Landroid/content/res/AssetManager;");
|
||||
handle_cache.webview.internalLoadChanged = _METHOD(handle_cache.webview.class, "internalLoadChanged", "(ILjava/lang/String;)V");
|
||||
|
||||
@@ -115,6 +115,7 @@ struct handle_cache {
|
||||
} drawable;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID constructor;
|
||||
jmethodID putExtraCharSequence;
|
||||
} intent;
|
||||
struct {
|
||||
@@ -122,6 +123,11 @@ struct handle_cache {
|
||||
jmethodID internalGetAssetManager;
|
||||
jmethodID internalLoadChanged;
|
||||
} webview;
|
||||
struct {
|
||||
jclass class;
|
||||
jmethodID onCreate;
|
||||
jmethodID start;
|
||||
} instrumentation;
|
||||
};
|
||||
|
||||
extern struct handle_cache handle_cache;
|
||||
|
||||
Reference in New Issue
Block a user