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
MessageQueue: integrate with glib main loop
Adds a special treatment for the main Looper to not block in java code, but instead return to glib managed thread loop. Timeouts in the mainloop are now handled using g_timeout_add_full(). Also defer Activity construction, so that every thing is set up properly when the constructor runs.
This commit is contained in:
@@ -14,7 +14,6 @@ struct handle_cache {
|
||||
jmethodID onResume;
|
||||
jmethodID onWindowFocusChanged;
|
||||
jmethodID onDestroy;
|
||||
jmethodID set_window;
|
||||
} apk_main_activity;
|
||||
struct {
|
||||
jclass class;
|
||||
@@ -81,7 +80,9 @@ extern struct handle_cache handle_cache;
|
||||
|
||||
const char * attribute_set_get_string(JNIEnv *env, jobject attrs, char *attribute, char *schema);
|
||||
int attribute_set_get_int(JNIEnv *env, jobject attrs, char *attribute, char *schema, int default_value);
|
||||
void set_up_handle_cache(JNIEnv *env, char *apk_main_activity_class);
|
||||
void set_up_handle_cache(JNIEnv *env);
|
||||
void extract_from_apk(const char *path, const char *target);
|
||||
|
||||
void prepare_main_looper(JNIEnv* env);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user