diff --git a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java index b2fb5e12053a..1590fd99b100 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java +++ b/android/Bootstrap/src/org/libreoffice/kit/LibreOfficeKit.java @@ -64,8 +64,7 @@ public final class LibreOfficeKit Log.i(LOGTAG, String.format("Initializing LibreOfficeKit, dataDir=%s\n", dataDir)); redirectStdio(true); - // ToDo: ugly workaround - find out why it segfaults with existing cachedir - deleteRecursive(activity.getApplication().getCacheDir()); + String cacheDir = activity.getApplication().getCacheDir().getAbsolutePath(); String apkFile = activity.getApplication().getPackageResourcePath(); @@ -93,20 +92,6 @@ public final class LibreOfficeKit } initializeDone = true; } - /** - * Deletes files and recursively deletes directories. - * - * @param file - * File or directory to be deleted. - */ - private static void deleteRecursive(File file) { - Log.d(LOGTAG, "deleting cacheDir recursively - this is only a workaround - fixme please"); - if (file.isDirectory()) { - for (File child : file.listFiles()) - deleteRecursive(child); - } - file.delete(); - } // Now with static loading we always have all native code in one native // library which we always call liblo-native-code.so, regardless of the diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index d2764d58c276..5cc1df3562f1 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -54,7 +54,7 @@ using namespace ::com::sun::star::frame; namespace { -#if HAVE_FEATURE_DESKTOP || defined(ANDROID) +#if HAVE_FEATURE_DESKTOP static char const ARGUMENT_PREFIX[] = "InternalIPC::Arguments"; static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments"; @@ -101,7 +101,7 @@ namespace desktop namespace { -#if HAVE_FEATURE_DESKTOP || defined(ANDROID) +#if HAVE_FEATURE_DESKTOP class Parser: public CommandLineArgs::Supplier { public: @@ -435,7 +435,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() if( pGlobalOfficeIPCThread.is() ) return IPC_STATUS_OK; -#if HAVE_FEATURE_DESKTOP || defined(ANDROID) +#if HAVE_FEATURE_DESKTOP OUString aUserInstallPath; OUString aDummy; @@ -443,8 +443,6 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() PipeMode nPipeMode = PIPEMODE_DONTKNOW; -#ifndef ANDROID // On Android it might be that we still for some reason need the pipe? - // In LibreOfficeKit-based programs we want to be totally independent from any other LibreOffice // instance or LOKit-using program. Certainly no need for any IPC pipes by definition, as we // don't have any reason to do any IPC. Why we even call this EnableOfficeIPCThread function @@ -459,7 +457,6 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() nPipeMode = PIPEMODE_CREATED; } else -#endif { // The name of the named pipe is created with the hashcode of the user installation directory (without /user). We have to retrieve // this information from a unotools implementation. @@ -685,12 +682,10 @@ bool OfficeIPCThread::IsEnabled() void OfficeIPCThread::execute() { -#if HAVE_FEATURE_DESKTOP || defined(ANDROID) +#if HAVE_FEATURE_DESKTOP -#ifndef ANDROID if (comphelper::LibreOfficeKit::isActive()) return; -#endif do {