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
main.c: call Java System.exit() on termination
This commit is contained in:
@@ -854,6 +854,13 @@ int main(int argc, char **argv)
|
|||||||
remove_ongoing_notifications();
|
remove_ongoing_notifications();
|
||||||
g_object_unref(app);
|
g_object_unref(app);
|
||||||
|
|
||||||
|
if (jvm) {
|
||||||
|
JNIEnv *env = get_jni_env();
|
||||||
|
jobject system = (*env)->FindClass(env, "java/lang/System");
|
||||||
|
jmethodID exit = (*env)->GetStaticMethodID(env, system, "exit", "(I)V");
|
||||||
|
(*env)->CallStaticVoidMethod(env, system, exit, status);
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user