diff --git a/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java index 5a692cb62..504b7592a 100644 --- a/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java +++ b/android/app/src/main/java/org/libreoffice/androidapp/MainActivity.java @@ -25,7 +25,7 @@ public class MainActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - //createLOOLWSD(); + createLOOLWSD(); final WebView browser = findViewById(R.id.browser); browser.setWebViewClient(new WebViewClient()); diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 1f7ab0556..ba1d3f134 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2713,12 +2713,11 @@ private: /// Process the discovery.xml file and return as string. static std::string getDiscoveryXML() { -#if defined __linux && MOBILEAPP - // discovery.xml is in the top directory - std::string discoveryPath = Path(Application::instance().commandPath()).parent().parent().toString() + "discovery.xml"; +#if MOBILEAPP + // not needed for mobile + return std::string(); #else std::string discoveryPath = Path(Application::instance().commandPath()).parent().toString() + "discovery.xml"; -#endif if (!File(discoveryPath).exists()) { // http://server/hosting/discovery.xml @@ -2767,6 +2766,7 @@ private: DOMWriter writer; writer.writeNode(ostrXML, docXML); return ostrXML.str(); +#endif } /// Create the /hosting/capabilities JSON and return as string. diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp index 9fc6577c7..a0a43910e 100644 --- a/wsd/LOOLWSD.hpp +++ b/wsd/LOOLWSD.hpp @@ -95,9 +95,14 @@ public: /// Return true iff extension is marked as view action in discovery.xml. static bool IsViewFileExtension(const std::string& extension) { +#if MOBILEAPP + (void) extension; + return false; // mark everything editable on mobile +#else std::string lowerCaseExtension = extension; std::transform(lowerCaseExtension.begin(), lowerCaseExtension.end(), lowerCaseExtension.begin(), ::tolower); return EditFileExtensions.find(lowerCaseExtension) == EditFileExtensions.end(); +#endif } /// Returns the value of the specified application configuration,