summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-11-10 13:10:03 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 23:04:26 +0100
commita703b3651b3d36a3abf8e0b7fa8b2fcd73c2b756 (patch)
tree21e9e84354baf21816489f9d43cb21ff0fac511a
parenta813044708c8297e4cbe634c7822c41336fcec87 (diff)
android: add destroy and exit as a separate JNI call
Change-Id: Ia8516da556b3736f34b366e2eb89ad8bbd7bafc1
-rw-r--r--android/Bootstrap/src/org/libreoffice/kit/Office.java1
-rw-r--r--desktop/source/lib/lokandroid.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java
index d6030665a3bc..bd6144f64b8c 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Office.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java
@@ -31,4 +31,5 @@ public class Office {
}
public native void destroy();
+ public native void destroyAndExit();
}
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index a6f02d6f74f3..707996ed1c88 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -69,6 +69,12 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroy(J
{
LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
pLibreOfficeKit->pClass->destroy(pLibreOfficeKit);
+}
+
+extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Office_destroyAndExit(JNIEnv* pEnv, jobject aObject)
+{
+ LibreOfficeKit* pLibreOfficeKit = getHandle<LibreOfficeKit>(pEnv, aObject);
+ pLibreOfficeKit->pClass->destroy(pLibreOfficeKit);
// Stopgap fix: _exit() to force the OS to restart the LO activity.
// Better than to hang.
_exit(0);