Skip to content

Commit

Permalink
fix(activity.c): fix reconnecting when activity soft restarted.
Browse files Browse the repository at this point in the history
  • Loading branch information
twaik committed Jan 8, 2025
1 parent 22fc34c commit 1f23789
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/cpp/lorie/activity.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ static void requestConnection(__unused JNIEnv *env, __unused jclass clazz) {
#undef errorReturn
}

static void connect_(__unused JNIEnv* env, __unused jobject cls, jint fd);
static void nativeInit(JNIEnv *env, jobject thiz) {
JavaVM* vm;
if (!Charset.self) {
Expand All @@ -119,6 +120,7 @@ static void nativeInit(JNIEnv *env, jobject thiz) {
(*env)->GetJavaVM(env, &vm);
(*vm)->AttachCurrentThread(vm, &guienv, NULL);
globalThiz = (*guienv)->NewGlobalRef(env, thiz);
connect_(NULL, NULL, -1);
}

static int xcallback(int fd, int events, __unused void* data) {
Expand Down

0 comments on commit 1f23789

Please sign in to comment.