Commit 24ec7d6b authored by Ryan Pavlik's avatar Ryan Pavlik
Browse files

IPC WIP

parent b553f9ce
......@@ -15,6 +15,7 @@
#include "xrt/xrt_config_android.h"
#include "android/android_load_class.hpp"
#include "android/android_custom_surface.h"
#include "util/u_logging.h"
using wrap::android::app::Activity;
......@@ -27,13 +28,15 @@ struct ipc_client_android
ipc_client_android(jobject act) : activity(act) {}
~ipc_client_android();
struct android_custom_surface *custom_surface;
Activity activity{};
Client client{nullptr};
};
ipc_client_android::~ipc_client_android()
{
android_custom_surface_destroy(&custom_surface);
// Tell Java that native code is done with this.
try {
if (!client.isNull()) {
......@@ -72,6 +75,7 @@ ipc_client_android_create(struct _JavaVM *vm, void *activity)
ret->client = Client::construct(ret.get());
ret->custom_surface = android_custom_surface_async_start(vm, activity);
return ret.release();
} catch (std::exception const &e) {
......
......@@ -142,8 +142,8 @@ public class Client implements ServiceConnection {
Activity activity = (Activity) context_;
MonadoView monadoView = MonadoView.attachToActivity(activity);
surfaceHolder = monadoView.waitGetSurfaceHolder(2000);
// MonadoView monadoView = MonadoView.attachToActivity(activity);
// surfaceHolder = monadoView.waitGetSurfaceHolder(2000);
synchronized (connectSync) {
if (!bind(context_, packageName)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment