Add JNI wrapper for InitUCBHelper() and call it
This commit is contained in:
parent
bb84db9f44
commit
6db50818c1
3 changed files with 27 additions and 0 deletions
|
@ -93,6 +93,10 @@ 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
|
||||||
|
// (contentbroker.cxx), also this called indirectly through the lo-bootstrap library
|
||||||
|
public static native void initUCBHelper();
|
||||||
|
|
||||||
public static void setup(Activity activity)
|
public static void setup(Activity activity)
|
||||||
{
|
{
|
||||||
String dataDir = null;
|
String dataDir = null;
|
||||||
|
|
|
@ -91,6 +91,8 @@ public class DocumentLoader
|
||||||
|
|
||||||
Log.i(TAG, "oDesktop is" + (oDesktop!=null ? " not" : "") + " null");
|
Log.i(TAG, "oDesktop is" + (oDesktop!=null ? " not" : "") + " null");
|
||||||
|
|
||||||
|
Bootstrap.initUCBHelper();
|
||||||
|
|
||||||
com.sun.star.frame.XComponentLoader xCompLoader =
|
com.sun.star.frame.XComponentLoader xCompLoader =
|
||||||
(com.sun.star.frame.XComponentLoader)
|
(com.sun.star.frame.XComponentLoader)
|
||||||
UnoRuntime.queryInterface(
|
UnoRuntime.queryInterface(
|
||||||
|
|
|
@ -1577,6 +1577,27 @@ Java_org_libreoffice_android_Bootstrap_setCommandArgs(JNIEnv* env,
|
||||||
(*osl_setCommandArgs)(c_argc, c_argv);
|
(*osl_setCommandArgs)(c_argc, c_argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static native void initUCBhelper();
|
||||||
|
|
||||||
|
__attribute__ ((visibility("default")))
|
||||||
|
void
|
||||||
|
Java_org_libreoffice_android_Bootstrap_initUCBHelper(JNIEnv* env,
|
||||||
|
jobject clazz)
|
||||||
|
{
|
||||||
|
void (*InitUCBHelper)(void);
|
||||||
|
(void) env;
|
||||||
|
(void) clazz;
|
||||||
|
|
||||||
|
/* This obviously should be called only after the ucbhelper so has been loaded */
|
||||||
|
|
||||||
|
InitUCBHelper = dlsym(RTLD_DEFAULT, "InitUCBHelper");
|
||||||
|
if (InitUCBHelper == NULL) {
|
||||||
|
LOGE("InitUCBHelper: InitUCBHelper not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
(*InitUCBHelper)();
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__ ((visibility("default")))
|
__attribute__ ((visibility("default")))
|
||||||
JavaVM *
|
JavaVM *
|
||||||
lo_get_javavm(void)
|
lo_get_javavm(void)
|
||||||
|
|
Loading…
Reference in a new issue