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 Activity.onPostCreate() and onPostResume()
These are used by androidx to handle the Fragment lifecycle
This commit is contained in:
@@ -54,6 +54,10 @@ static void activity_focus(JNIEnv *env, jobject activity)
|
||||
if((*env)->ExceptionCheck(env))
|
||||
(*env)->ExceptionDescribe(env);
|
||||
|
||||
(*env)->CallVoidMethod(env, activity, handle_cache.activity.onPostResume);
|
||||
if((*env)->ExceptionCheck(env))
|
||||
(*env)->ExceptionDescribe(env);
|
||||
|
||||
(*env)->CallVoidMethod(env, activity, handle_cache.activity.onWindowFocusChanged, true);
|
||||
if((*env)->ExceptionCheck(env))
|
||||
(*env)->ExceptionDescribe(env);
|
||||
@@ -129,6 +133,10 @@ void _activity_start(JNIEnv *env, jobject activity_object, bool recreate)
|
||||
return;
|
||||
}
|
||||
|
||||
(*env)->CallVoidMethod(env, activity_object, handle_cache.activity.onPostCreate, NULL);
|
||||
if((*env)->ExceptionCheck(env))
|
||||
(*env)->ExceptionDescribe(env);
|
||||
|
||||
if(recreate) // only allowed for toplevel, so we know for sure where in the stack it belongs
|
||||
activity_backlog = g_list_append(activity_backlog, _REF(activity_object));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user