Skip to content

Commit 62c1de4

Browse files
dbnicholsonrtibbles
authored andcommitted
Factor out JNI service entry point
This will be reused for WorkManager task entry points in a later commit.
1 parent 227cdfd commit 62c1de4

File tree

1 file changed

+23
-1
lines changed
  • pythonforandroid/bootstraps/common/build/jni/application/src

1 file changed

+23
-1
lines changed

pythonforandroid/bootstraps/common/build/jni/application/src/start.c

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ int SDL_main(int argc, char *argv[]) {
354354
}
355355
#endif
356356

357-
JNIEXPORT int JNICALL Java_org_kivy_android_PythonService_nativeStart(
357+
static int native_service_start(
358358
JNIEnv *env,
359359
jobject thiz,
360360
jstring j_android_private,
@@ -397,6 +397,28 @@ JNIEXPORT int JNICALL Java_org_kivy_android_PythonService_nativeStart(
397397
return run_python(1, argv);
398398
}
399399

400+
JNIEXPORT int JNICALL Java_org_kivy_android_PythonService_nativeStart(
401+
JNIEnv *env,
402+
jobject thiz,
403+
jstring j_android_private,
404+
jstring j_android_argument,
405+
jstring j_service_entrypoint,
406+
jstring j_python_name,
407+
jstring j_python_home,
408+
jstring j_python_path,
409+
jstring j_arg) {
410+
LOGP("Entering org.kivy.android.PythonService.nativeStart");
411+
return native_service_start(env,
412+
thiz,
413+
j_android_private,
414+
j_android_argument,
415+
j_service_entrypoint,
416+
j_python_name,
417+
j_python_home,
418+
j_python_path,
419+
j_arg);
420+
}
421+
400422
#if defined(BOOTSTRAP_NAME_WEBVIEW) || defined(BOOTSTRAP_NAME_SERVICEONLY)
401423
// Webview and service_only uses some more functions:
402424

0 commit comments

Comments
 (0)