Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ryan Pavlik
Monado
Commits
388c0d43
Commit
388c0d43
authored
Apr 13, 2021
by
Ryan Pavlik
Browse files
IPC WIP
parent
ab18632f
Pipeline
#733042
failed with stages
in 2 minutes and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/xrt/ipc/android/ipc_client_android.cpp
View file @
388c0d43
...
...
@@ -12,6 +12,8 @@
#include
"org.freedesktop.monado.ipc.hpp"
#include
"xrt/xrt_config_android.h"
#include
"android/android_load_class.hpp"
#include
"android/android_custom_surface.h"
#include
"util/u_logging.h"
#include
"android/android_load_class.hpp"
...
...
@@ -27,13 +29,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
())
{
...
...
@@ -64,6 +68,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
)
{
...
...
src/xrt/ipc/android/src/main/java/org/freedesktop/monado/ipc/Client.java
View file @
388c0d43
...
...
@@ -142,6 +142,11 @@ public class Client implements ServiceConnection {
public
int
blockingConnect
(
Context
context_
,
String
packageName
)
{
Log
.
i
(
TAG
,
"blockingConnect"
);
Activity
activity
=
(
Activity
)
context_
;
MonadoView
monadoView
=
MonadoView
.
attachToActivity
(
activity
);
surfaceHolder
=
monadoView
.
waitGetSurfaceHolder
(
2000
);
synchronized
(
binderSync
)
{
if
(!
bind
(
context_
,
packageName
))
{
Log
.
e
(
TAG
,
"Bind failed immediately"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment