Kaydet (Commit) c9f5b8a3 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add temporary test JNI method createWindowFoo()...

Change-Id: I8f99399faa3b0762bdea2aac09f1b849639cd191
üst a9a0ed1e
...@@ -97,10 +97,13 @@ public class Bootstrap extends NativeActivity ...@@ -97,10 +97,13 @@ public class Bootstrap extends NativeActivity
// where the lo-bootstrap library is. // where the lo-bootstrap library is.
public static native void setCommandArgs(String[] argv); public static native void setCommandArgs(String[] argv);
// A wrapper for InitUCBHelper() in he ucbhelper library // A wrapper for InitUCBHelper() in the ucbhelper library
// (contentbroker.cxx), also this called indirectly through the lo-bootstrap library // (contentbroker.cxx), also this called indirectly through the lo-bootstrap library
public static native void initUCBHelper(); public static native void initUCBHelper();
// A wrapper for createWindowFoo() in the vcl library
public static native int createWindowFoo();
// A method that starts a thread to redirect stdout and stderr writes to // A method that starts a thread to redirect stdout and stderr writes to
// the Android logging mechanism, or stops the redirection. // the Android logging mechanism, or stops the redirection.
public static native boolean redirect_stdio(boolean state); public static native boolean redirect_stdio(boolean state);
......
...@@ -1633,6 +1633,25 @@ Java_org_libreoffice_android_Bootstrap_initUCBHelper(JNIEnv* env, ...@@ -1633,6 +1633,25 @@ Java_org_libreoffice_android_Bootstrap_initUCBHelper(JNIEnv* env,
(*InitUCBHelper)(); (*InitUCBHelper)();
} }
__attribute__ ((visibility("default")))
jint
Java_org_libreoffice_android_Bootstrap_createWindowFoo(JNIEnv* env,
jobject clazz)
{
int (*createWindowFoo)(void);
(void) env;
(void) clazz;
lo_dlopen("libvcllo.so");
createWindowFoo = dlsym(RTLD_DEFAULT, "createWindowFoo");
if (createWindowFoo == NULL) {
LOGE("createWindowFoo: createWindowFoo not found");
return 0;
}
return (*createWindowFoo)();
}
/* Code for reading lines from the pipe based on the (Apache-licensed) Android /* Code for reading lines from the pipe based on the (Apache-licensed) Android
* logwrapper.c * logwrapper.c
*/ */
......
...@@ -107,6 +107,16 @@ WorkWindow::WorkWindow( WindowType nType ) : ...@@ -107,6 +107,16 @@ WorkWindow::WorkWindow( WindowType nType ) :
ImplInitWorkWindowData(); ImplInitWorkWindowData();
} }
#ifdef ANDROID
extern "C" void *
createWindowFoo(void)
{
return (void*) new WorkWindow((Window *)NULL);
}
#endif
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
WorkWindow::WorkWindow( Window* pParent, WinBits nStyle ) : WorkWindow::WorkWindow( Window* pParent, WinBits nStyle ) :
......
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