The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipc/client: Get Java fields out of instance info.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/1655>

authored by

Jarvis Huang and committed by
Rylie Pavlik
31ee231f 83bea591

+9 -3
+9 -3
src/xrt/ipc/client/ipc_client_connection.c
··· 51 51 #endif 52 52 53 53 #ifdef XRT_OS_ANDROID 54 - #include "android/android_globals.h" 55 54 #include "android/ipc_client_android.h" 56 55 #endif // XRT_OS_ANDROID 57 56 ··· 60 59 #ifdef XRT_OS_ANDROID 61 60 62 61 static bool 63 - ipc_client_socket_connect(struct ipc_connection *ipc_c) 62 + ipc_client_socket_connect(struct ipc_connection *ipc_c, struct _JavaVM *vm, void *context) 64 63 { 65 - ipc_c->ica = ipc_client_android_create(android_globals_get_vm(), android_globals_get_activity()); 64 + ipc_c->ica = ipc_client_android_create(vm, context); 66 65 67 66 if (ipc_c->ica == NULL) { 68 67 IPC_ERROR(ipc_c, "Client create error!"); ··· 356 355 } 357 356 358 357 // Connect the service. 358 + #ifdef XRT_OS_ANDROID 359 + struct _JavaVM *vm = i_info->platform_info.vm; 360 + void *context = i_info->platform_info.context; 361 + 362 + if (!ipc_client_socket_connect(ipc_c, vm, context)) { 363 + #else 359 364 if (!ipc_client_socket_connect(ipc_c)) { 365 + #endif 360 366 IPC_ERROR(ipc_c, 361 367 "Failed to connect to monado service process\n\n" 362 368 "###\n"