[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - 7 commits - android/README android/source configure.ac download.lst external/Module_external.mk external/owncloud-android-lib Makefile.fetch readlicense_oo/license RepositoryExternal.mk
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 22 07:47:41 UTC 2021
Makefile.fetch | 1
RepositoryExternal.mk | 16
android/README | 2
android/source/build.gradle | 5
android/source/res/drawable-hdpi/ic_folder_grey_144dp.xml | 5
android/source/res/drawable/ic_cloud_black_24dp.xml | 9
android/source/res/layout/activity_document_browser.xml | 20 +
android/source/res/menu/navigation_menu.xml | 7
android/source/res/values-de/strings.xml | 13
android/source/res/values-tr/strings.xml | 9
android/source/res/values/strings.xml | 13
android/source/res/xml/documentprovider_preferences.xml | 16
android/source/src/java/org/libreoffice/InvalidationHandler.java | 2
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 123 +++++-
android/source/src/java/org/libreoffice/storage/DocumentProviderFactory.java | 5
android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java | 3
android/source/src/java/org/libreoffice/storage/IDocumentProvider.java | 3
android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java | 178 ---------
android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java | 192 ----------
android/source/src/java/org/libreoffice/ui/FileUtilities.java | 1
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 101 +++++
configure.ac | 3
download.lst | 2
external/Module_external.mk | 1
external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk | 23 -
external/owncloud-android-lib/Makefile | 7
external/owncloud-android-lib/Module_owncloud-android-lib.mk | 19
external/owncloud-android-lib/README | 7
external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk | 16
external/owncloud-android-lib/build.gradle | 57 --
readlicense_oo/license/license.xml | 17
31 files changed, 244 insertions(+), 632 deletions(-)
New commits:
commit d126f2bfaa021924108461320eafaf0fd366fec9
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 19 17:20:45 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:46:54 2021 +0100
tdf#141111 android: Don't crash trying to edit read-only section
Trying to type in a read-only Writer section in Android Viewer
led to a crash due to
'/assets//config/soffice.cfg/modules/swriter/ui/inforeadonlydialog.ui'
not being present.
Include the .ui file to avoid this. (Trying to type now
doesn't do anything, no warning about this being
read-only is shown.)
Change-Id: I616d41c312187fa7855430715a47e80477ef2188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112771
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 1bf8f4569502b7900c51f2e238acda6567c96281)
Conflicts:
android/source/build.gradle
Change-Id: Ied7833105a2efb0b0b1f340c806904cfa1bd877c
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 91a92507b621..35a83be655c0 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -190,6 +190,7 @@ task copyAssets(type: Copy) {
into('config') {
from "${liboInstdir}/share/config"
include '**/pagebreakmenu.ui', '**/annotationmenu.ui', '**/headerfootermenu.ui',
+ '**/inforeadonlydialog.ui',
'**/tabviewbar.ui'
}
}
commit 44f4e1ce493f7d241ea2952dd5e9e604a3aef788
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 19 15:46:36 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:51 2021 +0100
tdf#129833 android: Move reading file to separate thread
Reading the input file from the main thread is problematic
when that happens over the network.
For example, trying to opening a file in a NextCloud share
using the system file picker from within the LO Android Viewer
app (with NextCloud app 3.15.1 serving as DocumentsProvider
for the NextCloud share in the file chooser) previously
resulted in a crash, with this in ADB log:
I DownloadFileOperation: Download of /Documents/five_pages.odt to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/<USERNAME>@demo2.nextcloud.com/Documents/five_pages.odt: Unexpected exception
E DocumentsStorageProvider: RemoteOperationResult(mSuccess=false, mHttpCode=-1, mHttpPhrase=null, mException=android.os.NetworkOnMainThreadException, mCode=HOST_NOT_AVAILABLE, message=null, getLogMessage=Unexpected exception)
Moving this to a separate thread fixes the
NetworkOnMainThreadException and made opening, editing
and saving the modified file back work successfully
for that scenario.
(Using a separate thread when writing back does not
seem to be necessary, but could be added in a similar
way.)
This just moves the IO to a new thread and then waits
for its completion.
For a better user experience in cases where the copy
operation may be slow, providing some additional
feedback in the UI might be useful.
Change-Id: I58e2c4bb1dcd2d59383fba0f216c9614f5d3e3a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112769
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 7f838b73e85eb6f0a1dce4647650a5cf5f34ccd2)
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index bf6108edc8af..368d19af1375 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -297,9 +297,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
}
private boolean copyFileToTemp() {
- ContentResolver contentResolver = getContentResolver();
- FileChannel inputChannel = null;
- FileChannel outputChannel = null;
+ final ContentResolver contentResolver = getContentResolver();
// CSV files need a .csv suffix to be opened in Calc.
String suffix = null;
String intentType = getIntent().getType();
@@ -308,26 +306,53 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
suffix = ".csv";
try {
+ mTempFile = File.createTempFile("LibreOffice", suffix, this.getCacheDir());
+ final FileChannel outputChannel = new FileOutputStream(mTempFile).getChannel();
try {
- AssetFileDescriptor assetFD = contentResolver.openAssetFileDescriptor(getIntent().getData(), "r");
- if (assetFD == null) {
- Log.e(LOGTAG, "couldn't create assetfiledescriptor from " + getIntent().getDataString());
- return false;
- }
- inputChannel = assetFD.createInputStream().getChannel();
- mTempFile = File.createTempFile("LibreOffice", suffix, this.getCacheDir());
+ // need to run copy operation in a separate thread, since network access is not
+ // allowed from main thread, but that may happen here when underlying
+ // DocumentsProvider (like the NextCloud one) does that
+ class CopyThread extends Thread {
+ /** Whether copy operation was successful. */
+ private boolean result = false;
- outputChannel = new FileOutputStream(mTempFile).getChannel();
- long bytesTransferred = 0;
- // might not copy all at once, so make sure everything gets copied...
- while (bytesTransferred < inputChannel.size()) {
- bytesTransferred += outputChannel.transferFrom(inputChannel, bytesTransferred, inputChannel.size());
+ @Override
+ public void run() {
+ result = false;
+ try {
+ final AssetFileDescriptor assetFD = contentResolver.openAssetFileDescriptor(getIntent().getData(), "r");
+ if (assetFD == null) {
+ Log.e(LOGTAG, "couldn't create assetfiledescriptor from " + getIntent().getDataString());
+ return;
+ }
+ FileChannel inputChannel = assetFD.createInputStream().getChannel();
+ long bytesTransferred = 0;
+ // might not copy all at once, so make sure everything gets copied...
+ while (bytesTransferred < inputChannel.size()) {
+ bytesTransferred += outputChannel.transferFrom(inputChannel, bytesTransferred, inputChannel.size());
+ }
+ Log.e(LOGTAG, "Success copying " + bytesTransferred + " bytes");
+ inputChannel.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ return;
+ }
+ result = true;
+ }
+ };
+ CopyThread copyThread = new CopyThread();
+ copyThread.start();
+ try {
+ // wait for copy operation to finish
+ // NOTE: might be useful to add some indicator in UI for long copy operations involving network...
+ copyThread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
- Log.e(LOGTAG, "Success copying " + bytesTransferred + " bytes");
- return true;
+
+ return copyThread.result;
} finally {
- if (inputChannel != null) inputChannel.close();
- if (outputChannel != null) outputChannel.close();
+ outputChannel.close();
}
} catch (FileNotFoundException e) {
return false;
commit 45c1efea0e31caf3f9484479a8f63ba4b9b4a294
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 19 14:29:36 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:41 2021 +0100
tdf#129833 android: Allow opening files using system file picker
Extend Android Viewer with the possibility to select a file to
open using the "system file picker", which can be opened by
an Intent that has the action 'Intent.ACTION_OPEN_DOCUMENT'
(or 'Intent.ACTION_GET_CONTENT' for API level < 19) set.
This way, all locations supported by currently installed and
set up DocumentsProviders [1] are generally supported.
In a test, opening local files worked just fine, but trying
to open a file located in a NextCloud share failed
(with the corresponding app [2] installed), showing this
in ADB log:
I DownloadFileOperation: Download of /Documents/five_pages.odt to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/<USERNAME>@demo2.nextcloud.com/Documents/five_pages.odt: Unexpected exception
E DocumentsStorageProvider: RemoteOperationResult(mSuccess=false, mHttpCode=-1, mHttpPhrase=null, mException=android.os.NetworkOnMainThreadException, mCode=HOST_NOT_AVAILABLE, message=null, getLogMessage=Unexpected exception)
This will be dealt with in a separate commit.
For now, this way to open files (and a corresponding menu
entry) is added in addition to the existing ones, but
since that method should in general be able to cover all of
the other use cases as well, the other options may be
dropped in the future.
[1] https://developer.android.com/reference/android/provider/DocumentsProvider
[2] https://github.com/nextcloud/android
Change-Id: I684a4aa770c0df7cc9fc35ff92445230405885f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112768
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit d678ee309b02b4cc8af29a097bf5053b8b1b4e06)
diff --git a/android/source/res/drawable-hdpi/ic_folder_grey_144dp.xml b/android/source/res/drawable-hdpi/ic_folder_grey_144dp.xml
new file mode 100644
index 000000000000..4ba799e20ef1
--- /dev/null
+++ b/android/source/res/drawable-hdpi/ic_folder_grey_144dp.xml
@@ -0,0 +1,5 @@
+<vector android:autoMirrored="true" android:height="144dp"
+ android:viewportHeight="24.0" android:viewportWidth="24.0"
+ android:width="144dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FF606060" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
+</vector>
diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml
index 8e17a3e1624f..b3b4ace2a465 100644
--- a/android/source/res/layout/activity_document_browser.xml
+++ b/android/source/res/layout/activity_document_browser.xml
@@ -104,6 +104,26 @@
android:background="@color/background_normal"
android:orientation="vertical" />
+ <!--Icon and text to open system file picker via Intent -->
+ <LinearLayout
+ android:id="@+id/system_file_picker_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorButtonNormal"
+ android:orientation="horizontal"
+ app:layout_constraintTop_toBottomOf="@id/toolbar">
+
+ <TextView
+ android:id="@+id/open_file_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:drawableLeft="@drawable/ic_folder_grey_144dp"
+ android:gravity="center_vertical"
+ android:text="@string/select_file_to_open"
+ android:textSize="24dp" />
+ </LinearLayout>
+
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
diff --git a/android/source/res/menu/navigation_menu.xml b/android/source/res/menu/navigation_menu.xml
index 4098b27b8cac..ef6354b5dcff 100644
--- a/android/source/res/menu/navigation_menu.xml
+++ b/android/source/res/menu/navigation_menu.xml
@@ -19,6 +19,11 @@
<item android:id="@+id/menu_provider_otg"
android:title="@string/otg_file_system"
android:icon="@drawable/ic_usb_black_24dp"/>
+
+ <item android:id="@+id/menu_system_file_dialog"
+ android:title="@string/system_file_selector"
+ android:icon="@drawable/ic_folder_black_24dp" />
+
</group>
<group android:orderInCategory="100">
diff --git a/android/source/res/values-de/strings.xml b/android/source/res/values-de/strings.xml
index 64eaa844a754..4c6e25342ef7 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -22,6 +22,9 @@
<string name="new_drawing">Neue Zeichnung</string>
<string name="default_document_name">unbenannt</string>
+ <string name="system_file_selector">System-Dateidialog</string>
+ <string name="select_file_to_open">Datei zum Öffnen auswählen</string>
+
<string name="browser_app_name">LibreOffice Browser</string>
<string name="menu_search">Suchen</string>
<string name="list_view">Liste</string>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index a44d81ee5faf..8205176df685 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -22,6 +22,9 @@
<string name="new_drawing">New Drawing</string>
<string name="default_document_name">untitled</string>
+ <string name="system_file_selector">System File Dialog</string>
+ <string name="select_file_to_open">Select file to open</string>
+
<string name="browser_app_name">LibreOffice Browser</string>
<string name="menu_search">Search</string>
<string name="list_view">List</string>
diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 7a58486004cd..28f1906a6369 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -56,6 +56,7 @@ public class FileUtilities {
private static final Map<String, String> extensionToMimeTypeMap = new HashMap<String, String>();
static {
// Please keep this in sync with AndroidManifest.xml
+ // and 'SUPPORTED_MIME_TYPES' in LibreOfficeUIActivity.java
// ODF
mExtnMap.put(".odt", DOC);
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index f52972b86f26..8e84868dbda5 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -12,6 +12,7 @@ package org.libreoffice.ui;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
+import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -127,9 +128,51 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
public static final String NEW_CALC_STRING_KEY = "private:factory/scalc";
public static final String NEW_DRAW_STRING_KEY = "private:factory/sdraw";
+ // keep this in sync with 'AndroidManifext.xml'
+ private static final String[] SUPPORTED_MIME_TYPES = {
+ "application/vnd.oasis.opendocument.text",
+ "application/vnd.oasis.opendocument.graphics",
+ "application/vnd.oasis.opendocument.presentation",
+ "application/vnd.oasis.opendocument.spreadsheet",
+ "application/vnd.oasis.opendocument.text-flat-xml",
+ "application/vnd.oasis.opendocument.graphics-flat-xml",
+ "application/vnd.oasis.opendocument.presentation-flat-xml",
+ "application/vnd.oasis.opendocument.spreadsheet-flat-xml",
+ "application/vnd.oasis.opendocument.text-template",
+ "application/vnd.oasis.opendocument.spreadsheet-template",
+ "application/vnd.oasis.opendocument.graphics-template",
+ "application/vnd.oasis.opendocument.presentation-template",
+ "application/rtf",
+ "text/rtf",
+ "application/msword",
+ "application/vnd.ms-powerpoint",
+ "application/vnd.ms-excel",
+ "application/vnd.visio",
+ "application/vnd.visio.xml",
+ "application/x-mspublisher",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
+ "application/vnd.openxmlformats-officedocument.presentationml.template",
+ "text/csv",
+ "text/comma-separated-values",
+ "application/vnd.ms-works",
+ "application/vnd.apple.keynote",
+ "application/x-abiword",
+ "application/x-pagemaker",
+ "image/x-emf",
+ "image/x-svm",
+ "image/x-wmf",
+ "image/svg+xml",
+ };
+
public static final int GRID_VIEW = 0;
public static final int LIST_VIEW = 1;
+ private static final int REQUEST_CODE_OPEN_FILECHOOSER = 12345;
+
private DrawerLayout drawerLayout;
private NavigationView navigationDrawer;
private ActionBar actionBar;
@@ -151,6 +194,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
private LinearLayout writerLayout;
private LinearLayout impressLayout;
private LinearLayout calcLayout;
+ private LinearLayout systemFilePickerLayout;
+ private TextView openFileView;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -207,6 +252,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
impressLayout = findViewById(R.id.impressLayout);
calcLayout = findViewById(R.id.calcLayout);
drawLayout = findViewById(R.id.drawLayout);
+ openFileView = findViewById(R.id.open_file_view);
+ openFileView.setOnClickListener(this);
recentRecyclerView = findViewById(R.id.list_recent);
@@ -228,6 +275,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
recentRecyclerView.setAdapter(new RecentFilesAdapter(this, recentFiles));
fileRecyclerView = findViewById(R.id.file_recycler_view);
+ systemFilePickerLayout = findViewById(R.id.system_file_picker_layout);
//This should be tested because it possibly disables view recycling
fileRecyclerView.setNestedScrollingEnabled(false);
openDirectory(currentDirectory);
@@ -277,6 +325,11 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
return true;
}
+ case R.id.menu_system_file_dialog: {
+ switchToSystemFileDialogLayout();
+ return true;
+ }
+
default:
return false;
}
@@ -306,6 +359,9 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
drawerToggle.setDrawerIndicatorEnabled(true);
drawerLayout.addDrawerListener(drawerToggle);
drawerToggle.syncState();
+
+ // initially show layout with item to open system file picker
+ switchToSystemFileDialogLayout();
}
private void expandFabMenu() {
@@ -418,7 +474,43 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
return viewMode == LIST_VIEW;
}
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == REQUEST_CODE_OPEN_FILECHOOSER && resultCode == RESULT_OK) {
+ final Uri fileUri = data.getData();
+
+ // "forward" to LibreOfficeMainActivity to open the file
+ Intent intent = new Intent(Intent.ACTION_VIEW, fileUri);
+ intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
+ String packageName = getApplicationContext().getPackageName();
+ ComponentName componentName = new ComponentName(packageName,
+ LibreOfficeMainActivity.class.getName());
+ intent.setComponent(componentName);
+ startActivity(intent);
+ }
+ }
+
+ private void showSystemFilePickerAndOpenFile() {
+ Intent intent = new Intent();
+ try {
+ intent.setAction(Intent.ACTION_OPEN_DOCUMENT);
+ } catch (ActivityNotFoundException exception) {
+ // Intent.ACTION_OPEN_DOCUMENT added in API level 19, but minSdkVersion is currently 16
+ intent.setAction(Intent.ACTION_GET_CONTENT);
+ }
+
+ intent.setType("*/*");
+ intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);;
+
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivityForResult(intent, REQUEST_CODE_OPEN_FILECHOOSER);
+ }
+ }
+
+
private void switchToDocumentProvider(IDocumentProvider provider) {
+ fileRecyclerView.setVisibility(View.VISIBLE);
+ systemFilePickerLayout.setVisibility(View.GONE);
new AsyncTask<IDocumentProvider, Void, Void>() {
@Override
@@ -467,6 +559,13 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
}.execute(provider);
}
+ private void switchToSystemFileDialogLayout() {
+ fileRecyclerView.setVisibility(View.GONE);
+ findViewById(R.id.text_directory_path).setVisibility(View.GONE);
+ systemFilePickerLayout.setVisibility(View.VISIBLE);
+ refreshView();
+ }
+
public void openDirectory(IFile dir) {
if (dir == null)
return;
@@ -1065,6 +1164,9 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
expandFabMenu();
}
break;
+ case R.id.open_file_view:
+ showSystemFilePickerAndOpenFile();
+ break;
case R.id.newWriterFAB:
createNewFileInputDialog(getString(R.string.default_document_name) + FileUtilities.DEFAULT_WRITER_EXTENSION, NEW_WRITER_STRING_KEY);
break;
commit b7e7f3aaf3618f29a40876823c0cfda47a9c11e3
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 19 13:07:41 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:29 2021 +0100
tdf#129833 android: Allow editing writable docs passed by Intent
When a document is passed by an Intent in Android
Viewer, allow editing if the Intent has flag
'Intent.FLAG_GRANT_WRITE_URI_PERMISSION' set.
Since LibreOffice operates on a temporary copy
in this case, write the content of the
temporary file back to the original URI
when saving.
This in particular allows editing documents
passed from third-party apps, e.g. opened from
Android's "Files" app or the NextCloud app.
The online-based Android app already does
something similar.
Change-Id: Icf252a95dd9a8089ca8610ccf3edfbeee2682e1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112767
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 2df8b776e635efc5e59aaf6c8a5a7f4c218d74d0)
diff --git a/android/source/res/values-de/strings.xml b/android/source/res/values-de/strings.xml
index ff58b14babc5..64eaa844a754 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -96,6 +96,7 @@
<string name="message_saved">Speichern beendet</string>
<string name="message_saving">Dokument wird gespeichert…</string>
<string name="message_save_incomplete">Speichern unvollständig. Gab es Änderungen?</string>
+ <string name="message_saving_failed">Speichern des Dokuments ist fehlgeschlagen.</string>
<string name="create_new_file_success">"Neue Datei angelegt - "</string>
<string name="create_new_file_error">Neue Datei konnte nicht angelegt weden, bitte Prüfen Sie den eingegeben Dateinamen.</string>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index aa32497862f6..a44d81ee5faf 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -95,6 +95,7 @@
<!-- Feedback messages -->
<string name="message_saved">Save complete</string>
<string name="message_saving">Saving the document…</string>
+ <string name="message_saving_failed">Saving the document failed.</string>
<string name="message_save_incomplete">Save incomplete. Were there any changes?</string>
<string name="create_new_file_success">"Created new file - "</string>
<string name="create_new_file_error">Unable to create new file, please check entered file name.</string>
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index 32e9b56656dd..588fec9f5372 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -139,7 +139,7 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
JSONObject payloadObject = new JSONObject(payload);
if (payloadObject.getString("commandName").equals(".uno:Save")) {
if (payloadObject.getString("success").equals("true")) {
- mContext.saveFilesToCloud();
+ mContext.saveFileToOriginalSource();
}
}else if(payloadObject.getString("commandName").equals(".uno:Name") ||
payloadObject.getString("commandName").equals(".uno:RenamePage")){
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index b640fa404973..bf6108edc8af 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -46,9 +46,11 @@ import org.mozilla.gecko.gfx.GeckoLayerClient;
import org.mozilla.gecko.gfx.LayerView;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
@@ -191,7 +193,8 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
if (getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT)) {
if (copyFileToTemp() && mTempFile != null) {
mInputFile = mTempFile;
- mbISReadOnlyMode = true;
+ boolean isReadOnlyDoc = (getIntent().getFlags() & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0;
+ mbISReadOnlyMode = !isExperimentalMode() || isReadOnlyDoc;
Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath());
String displayName = extractDisplayNameFromIntent();
@@ -355,6 +358,61 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND_NOTIFY, ".uno:Save", true));
}
+ public void saveFileToOriginalSource() {
+ if (documentUri != null) {
+ // case where file was opened using IDocumentProvider from within LO app
+ saveFilesToCloud();
+ } else {
+ // case where file was passed via Intent
+ if (isReadOnlyMode() || mInputFile == null || getIntent().getData() == null || !getIntent().getData().getScheme().equals(ContentResolver.SCHEME_CONTENT))
+ return;
+
+ Uri uri = getIntent().getData();
+ FileInputStream inputStream = null;
+ OutputStream outputStream = null;
+
+ try {
+ inputStream = new FileInputStream(mInputFile);
+ // OutputStream for the actual (original) location
+ outputStream = getContentResolver().openOutputStream(uri);
+
+ byte[] buffer = new byte[4096];
+ int readBytes = inputStream.read(buffer);
+ while (readBytes != -1) {
+ outputStream.write(buffer, 0, readBytes);
+ readBytes = inputStream.read(buffer);
+ }
+
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ Toast.makeText(LibreOfficeMainActivity.this, R.string.message_saved,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
+ setDocumentChanged(false);
+ } catch (Exception e) {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ Toast.makeText(LibreOfficeMainActivity.this, R.string.message_saving_failed,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
+ e.printStackTrace();
+ } finally {
+ try {
+ if (inputStream != null)
+ inputStream.close();
+ if (outputStream != null)
+ outputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
public void saveFilesToCloud(){
final Activity activity = LibreOfficeMainActivity.this;
final AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
commit d8d7bc8c834beef0e03e652f3cef6b40ea509b87
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Mar 17 12:54:01 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:20 2021 +0100
Drop external owncloud-android-lib
It's no longer used by Android Viewer and use in
the online-based Android app has already been removed
in online commit
commit 2a52d768dd61f2ef8fedccb32f015c9095915935
Date: Wed Feb 19 09:05:56 2020 +0100
android shell: Remove the 'storage framework', we have content providers.
Change-Id: I468c7121eb495eb8b1a8892f14f2c289b94b7a93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112766
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 2fa33c89ffcf0bb5aa013ee71a06b12676b42997)
diff --git a/Makefile.fetch b/Makefile.fetch
index 0a6202a4b3c7..2822d0a854f2 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -201,7 +201,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,OPENLDAP,OPENLDAP_TARBALL) \
$(call fetch_Optional,OPENSSL,OPENSSL_TARBALL) \
$(call fetch_Optional,ORCUS,ORCUS_TARBALL) \
- $(call fetch_Optional,OWNCLOUD_ANDROID_LIB,OWNCLOUD_ANDROID_LIB_TARBALL) \
$(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \
$(call fetch_Optional,PDFIUM,PDFIUM_TARBALL) \
$(call fetch_Optional,POPPLER,POPPLER_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index ad3febbae41b..d8ecef038930 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4103,22 +4103,6 @@ endef
endif
-ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
-
-$(eval $(call gb_Helper_register_jars,OXT,\
- owncloud-android-library \
-))
-
-define gb_Jar__use_owncloud_android_lib
-$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
-$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
-endef
-define gb_ExternalProject__use_owncloud_android_lib
-$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
-endef
-
-endif
-
ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
ifneq ($(SYSTEM_BZIP2),)
diff --git a/configure.ac b/configure.ac
index b0746dd5304a..c10dc6cdc7b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -751,9 +751,6 @@ if test -n "$with_android_ndk"; then
CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
CXX_BASE="clang++"
fi
-
- # remember to download the ownCloud Android library later
- BUILD_TYPE="$BUILD_TYPE OWNCLOUD_ANDROID_LIB"
fi
AC_SUBST(ANDROID_NDK_HOME)
AC_SUBST(ANDROID_APP_ABI)
diff --git a/download.lst b/download.lst
index 62c14cdb39da..aa9e647dab06 100644
--- a/download.lst
+++ b/download.lst
@@ -208,8 +208,6 @@ export OPENSSL_SHA256SUM := e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de6
export OPENSSL_TARBALL := openssl-1.1.1i.tar.gz
export ORCUS_SHA256SUM := c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f90a298587a4
export ORCUS_TARBALL := liborcus-0.16.1.tar.bz2
-export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
-export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
export PDFIUM_SHA256SUM := eca406d47ac7e2a84dcc86f93c08f96e591d409589e881477fa75e488e4851d8
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 1c722a325c2d..b6be1edd7190 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -83,7 +83,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,OPENLDAP,openldap) \
$(call gb_Helper_optional,OPENSSL,openssl) \
$(call gb_Helper_optional,ORCUS,liborcus) \
- $(call gb_Helper_optional,OWNCLOUD_ANDROID_LIB,owncloud-android-lib) \
$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
$(call gb_Helper_optional,PDFIUM,pdfium) \
$(call gb_Helper_optional,POPPLER,poppler) \
diff --git a/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk b/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk
deleted file mode 100644
index 149becee9209..000000000000
--- a/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalProject_ExternalProject,owncloud_android_lib))
-
-$(eval $(call gb_ExternalProject_register_targets,owncloud_android_lib,\
- build \
-))
-
-$(call gb_ExternalProject_get_state_target,owncloud_android_lib,build) :
- $(call gb_Trace_StartRange,owncloud_android_lib,EXTERNAL)
- $(call gb_ExternalProject_run,build,\
- ANDROID_HOME=$(ANDROID_SDK_HOME) $(SRCDIR)/android/source/gradlew assemble \
- )
- $(call gb_Trace_EndRange,owncloud_android_lib,EXTERNAL)
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/Makefile b/external/owncloud-android-lib/Makefile
deleted file mode 100644
index e4968cf85fb6..000000000000
--- a/external/owncloud-android-lib/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-
-module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-
-include $(module_directory)/../../solenv/gbuild/partial_build.mk
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/Module_owncloud-android-lib.mk b/external/owncloud-android-lib/Module_owncloud-android-lib.mk
deleted file mode 100644
index a57e70a79b84..000000000000
--- a/external/owncloud-android-lib/Module_owncloud-android-lib.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Module_Module,owncloud_android_lib))
-
-ifneq ($(ENABLE_JAVA),)
-$(eval $(call gb_Module_add_targets,owncloud_android_lib, \
- ExternalProject_owncloud_android_lib \
- UnpackedTarball_owncloud_android_lib \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/README b/external/owncloud-android-lib/README
deleted file mode 100644
index 921619d630cc..000000000000
--- a/external/owncloud-android-lib/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Library required to access ownCloud servers from Android.
-
-Code from https://github.com/jaragunde/owncloud-android-library, release 0.9.4.
-Notice it is a fork from the official repository at
-https://github.com/owncloud/android-library, the test and example projects have
-been removed and the binary jars have been replaced with the sources of the
-required libraries.
diff --git a/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk b/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk
deleted file mode 100644
index b9038cd1c961..000000000000
--- a/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_UnpackedTarball_UnpackedTarball,owncloud_android_lib))
-
-$(eval $(call gb_UnpackedTarball_set_tarball,owncloud_android_lib,$(OWNCLOUD_ANDROID_LIB_TARBALL)))
-
-$(eval $(call gb_UnpackedTarball_add_file,owncloud_android_lib,build.gradle,external/owncloud-android-lib/build.gradle))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/build.gradle b/external/owncloud-android-lib/build.gradle
deleted file mode 100644
index 9203dc45a549..000000000000
--- a/external/owncloud-android-lib/build.gradle
+++ /dev/null
@@ -1,57 +0,0 @@
-apply plugin: 'com.android.library'
-buildscript {
- repositories {
- jcenter()
- google()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.1.3'
- }
-}
-
-allprojects {
- repositories {
- jcenter()
- google()
- }
-}
-
-android {
- useLibrary 'org.apache.http.legacy'
-
- compileOptions {
- encoding 'ISO8859-1'
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
- }
-
- compileSdkVersion 26
- buildToolsVersion "27.0.3"
-
- defaultConfig {
- minSdkVersion 16
- targetSdkVersion 26
- }
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java {
- srcDirs = [
- 'libs/commons-codec-1.9/src/main/java',
- 'libs/commons-httpclient-3.1/src/java',
- 'libs/jackrabbit-webdav-2.7.2/src/main/java',
- 'libs/slf4j-1.7.12/src/java',
- 'libs/tomcat-7.0.40/java',
- 'src'
- ]
- }
- resources {
- srcDirs = [
- 'libs/tomcat-7.0.40/java',
- 'libs/jackrabbit-webdav-2.7.2/src/main/java'
- ]
- }
- }
- }
-}
diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml
index 2c45a12fd202..77ca913c7d74 100644
--- a/readlicense_oo/license/license.xml
+++ b/readlicense_oo/license/license.xml
@@ -1575,23 +1575,6 @@
changed. i.e. this code cannot simply be copied and put under another distribution license [including the GNU
Public License.]</p>
</div>
- <div class="OWNCLOUD_ANDROID_LIB">
- <h2>ownCloud Android Library</h2>
- <p>The following software may be included in this product: ownCloud Android Library. ownCloud Android Library
- is available under MIT license.</p>
- <p>Copyright (C) 2019 ownCloud GmbH. Copyright (C) 2012 Bartek Przybylski</p>
- <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
- documentation files (the "Software"), to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
- <p>The above copyright notice and this permission notice shall be included in all copies or substantial
- portions of the Software.</p>
- <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
- SHALL THE AUTHORS OR COPYRIGHT HOLDERSBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.</p>
- </div>
<div class="PDFIUM">
<h2>PDFium</h2>
<p>The following software may be included in this product: PDFium. Use of any of this software is governed by
commit 45f2efe6a6036688a203023b1a2e7eccae7419fa
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Mar 17 12:02:17 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:11 2021 +0100
tdf#129833 android: Drop non-working ownCloud/nextCloud support
As mentioned in tdf#129833 comment 3, the idea is to
use Android's "system file dialog" to select files rather
than maintain a separate ownCloud/nextCloud connector in the
Android Viewer app.
This way, everything for which a DocumentsProvider [1] is
available will be available from within the app, once
Android Viewer has been adapted to support those, which is
planned for a subsequent step.
Corresponding DocumentsProviders for ownCloud [2] and nextCloud [3]
exist.
[1] https://developer.android.com/reference/android/provider/DocumentsProvider
[2] https://github.com/owncloud/android
[3] https://github.com/nextcloud/android
Change-Id: I6581ce36672f582f91d47598afdfd32c3a4a58da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112765
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 6012599e17206ee7be9a83477654e7bd194079c3)
diff --git a/android/source/build.gradle b/android/source/build.gradle
index 637a0495ff2d..91a92507b621 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -7,9 +7,6 @@ allprojects {
repositories {
jcenter()
google()
- flatDir {
- dirs "${liboWorkdir}/UnpackedTarball/owncloud_android_lib/build/outputs/aar"
- }
}
}
//build-time dependencies - android plugin for gradle
@@ -30,7 +27,6 @@ dependencies {
"libreoffice.jar",
"unoloader.jar"
])
- implementation(name:'owncloud_android_lib', ext:'aar')
implementation 'com.android.support:design:27.1.1' // also pulls-in corresponding support libraries
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
}
diff --git a/android/source/res/drawable/ic_cloud_black_24dp.xml b/android/source/res/drawable/ic_cloud_black_24dp.xml
deleted file mode 100644
index e0940ca0e7b0..000000000000
--- a/android/source/res/drawable/ic_cloud_black_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path
- android:fillColor="#FF000000"
- android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96z"/>
-</vector>
diff --git a/android/source/res/menu/navigation_menu.xml b/android/source/res/menu/navigation_menu.xml
index db680a9a1b8c..4098b27b8cac 100644
--- a/android/source/res/menu/navigation_menu.xml
+++ b/android/source/res/menu/navigation_menu.xml
@@ -19,12 +19,6 @@
<item android:id="@+id/menu_provider_otg"
android:title="@string/otg_file_system"
android:icon="@drawable/ic_usb_black_24dp"/>
-
- <item android:id="@+id/menu_provider_owncloud"
- android:title="@string/owncloud"
- android:icon="@drawable/ic_cloud_black_24dp"/>
-
-
</group>
<group android:orderInCategory="100">
diff --git a/android/source/res/values-de/strings.xml b/android/source/res/values-de/strings.xml
index a4f88b2742c4..ff58b14babc5 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -75,13 +75,8 @@
<string name="local_file_system">Lokales Dateisystem</string>
<string name="external_sd_file_system">Externe SD</string>
<string name="otg_file_system">OTG-Gerät (experimentell)</string>
- <string name="owncloud">Entfernter Server</string>
<string name="usb_connected_configure">USB verbunden, richten Sie Ihr Gerät ein.</string>
- <string name="owncloud_wrong_connection">Verbindung mit dem ownCloud-Server nicht möglich. Prüfen Sie die Einstellungen.</string>
- <string name="owncloud_unauthorized">Anmeldung am ownCloud-Server nicht möglich. Prüfen Sie die Einstellungen.</string>
- <string name="owncloud_unspecified_error">Nicht näher spezifizierter Fehler beim Verbindungsaufbau zum ownCloud-Server. Prüfen Sie die Einstellungen und/oder versuchen Sie es später.</string>
-
<string name="ext_document_provider_error">Ungültige Wurzel-Datei. Prüfen Sie die SD-Karten-Einstellungen.</string>
<string name="legacy_extsd_missing_error">Ungültige Wurzel-Datei. Prüfen Sie die externe SD-Karte und/oder die Einstellungen</string>
<string name="otg_missing_error">Ungültige Wurzel-Datei. Prüfen Sie Ihr OTG-Gerät und/oder die Einstellungen.</string>
@@ -106,14 +101,10 @@
<!-- Document provider settings -->
<string name="storage_provider_settings">Speicheranbieter-Einstellungen</string>
- <string name="owncloud_settings">ownCloud-Einstellungen</string>
<string name="physical_storage_settings">Einstellungen für physikalischen Speicher</string>
<string name="external_sd_path">Pfad zur externen SD-Karte</string>
<string name="otg_device_path">Pfad zum OTG-Gerät</string>
<string name="otg_warning">Experimentelles Feature: Nur verwenden, wenn OTG-Gerät beschreibbar ist.</string>
- <string name="server_url">Server-URL</string>
- <string name="server_url_and_port">URL und Port des ownCloud-Servers.</string>
- <string name="user_name">Benutzername</string>
<string name="password">Passwort</string>
<string name="action_undo">Rückgängig</string>
<string name="action_redo">Wiederherstellen</string>
diff --git a/android/source/res/values-tr/strings.xml b/android/source/res/values-tr/strings.xml
index 3bada4ded6be..4ce70e91607d 100644
--- a/android/source/res/values-tr/strings.xml
+++ b/android/source/res/values-tr/strings.xml
@@ -75,13 +75,8 @@
<string name="local_file_system">Yerel dosya sistemi</string>
<string name="external_sd_file_system">Harici SD</string>
<string name="otg_file_system">OTG cihazı (deneysel)</string>
- <string name="owncloud">Uzak sunucu</string>
<string name="usb_connected_configure">USB bağlantısı yapıldı, cihazınızın ayarlarını yapınız.</string>
- <string name="owncloud_wrong_connection">ownCloud sunucusuna bağlanılamadı. Ayarlarınızı kontrol ediniz.</string>
- <string name="owncloud_unauthorized">ownCloud sunucusuna giriş yapılamadı. Ayarlarınızı kontrol ediniz.</string>
- <string name="owncloud_unspecified_error">ownCloud sunucusuna bağlanırken belirtilmemiş bir hata oluştu. Lütfen daha sonra tekrar deneyiniz veya ayarlarınızı kontrol ediniz.</string>
-
<string name="ext_document_provider_error">Geçersiz dizin. SD kart ayarlarınızı kontrol ediniz.</string>
<string name="legacy_extsd_missing_error">Geçersiz dizin. SD kartınızı veya SD kart ayarlarınızı kontrol ediniz.</string>
<string name="otg_missing_error">Geçersiz dizin. OTG cihazınızı veya OTG cihazı ayarlarınızı kontrol ediniz.</string>
@@ -106,14 +101,10 @@
<!-- Document provider settings -->
<string name="storage_provider_settings">Depolama sağlayıcısı ayarları</string>
- <string name="owncloud_settings">ownCloud ayarları</string>
<string name="physical_storage_settings">Fiziksel depolama ayarları</string>
<string name="external_sd_path">Harici SD yolu</string>
<string name="otg_device_path">OTG cihazı yolu</string>
<string name="otg_warning">Deneysel özellik: OTG cihazı yazılabilir ise kullanın</string>
- <string name="server_url">Sunucu URL</string>
- <string name="server_url_and_port">ownCloud sunucusu URL ve port</string>
- <string name="user_name">Kullanıcı Adı</string>
<string name="password">Parola</string>
<string name="action_undo">Geri Al</string>
<string name="action_redo">Yinele</string>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index 3669d0a2ed90..aa32497862f6 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -75,13 +75,8 @@
<string name="local_file_system">Local file system</string>
<string name="external_sd_file_system">External SD</string>
<string name="otg_file_system">OTG device (experimental)</string>
- <string name="owncloud">Remote server</string>
<string name="usb_connected_configure">USB connected, configure your device.</string>
- <string name="owncloud_wrong_connection">Cannot connect to ownCloud server. Check your configuration.</string>
- <string name="owncloud_unauthorized">Cannot log into ownCloud server. Check your configuration.</string>
- <string name="owncloud_unspecified_error">Unspecified error connecting to ownCloud server. Check your configuration and/or try later.</string>
-
<string name="ext_document_provider_error">Invalid root file. Check your sd card configuration.</string>
<string name="legacy_extsd_missing_error">Invalid root file. Check your external sd card and/or configuration.</string>
<string name="otg_missing_error">Invalid root file. Check your OTG device and/or configuration.</string>
@@ -106,14 +101,10 @@
<!-- Document provider settings -->
<string name="storage_provider_settings">Storage provider settings</string>
- <string name="owncloud_settings">ownCloud settings</string>
<string name="physical_storage_settings">Physical storage settings</string>
<string name="external_sd_path">External SD path</string>
<string name="otg_device_path">OTG device path</string>
<string name="otg_warning">Experimental Feature: Use only if OTG device is writable.</string>
- <string name="server_url">Server URL</string>
- <string name="server_url_and_port">URL and port of the ownCloud server.</string>
- <string name="user_name">User name</string>
<string name="password">Password</string>
<string name="action_undo">Undo</string>
<string name="action_redo">Redo</string>
diff --git a/android/source/res/xml/documentprovider_preferences.xml b/android/source/res/xml/documentprovider_preferences.xml
index bb5f087ddf71..1f4acc7b2f01 100644
--- a/android/source/res/xml/documentprovider_preferences.xml
+++ b/android/source/res/xml/documentprovider_preferences.xml
@@ -6,22 +6,6 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
- <PreferenceCategory
- android:title="@string/owncloud_settings"
- android:key="pref_key_owncloud_settings">
- <EditTextPreference
- android:key="pref_server_url"
- android:title="@string/server_url"
- android:summary="@string/server_url_and_port"
- android:hint="https://server:port/" />
- <EditTextPreference
- android:key="pref_user_name"
- android:title="@string/user_name" />
- <EditTextPreference
- android:key="pref_password"
- android:title="@string/password"
- android:password="true" />
- </PreferenceCategory>
<PreferenceCategory
android:title="@string/physical_storage_settings">
<PreferenceScreen
diff --git a/android/source/src/java/org/libreoffice/storage/DocumentProviderFactory.java b/android/source/src/java/org/libreoffice/storage/DocumentProviderFactory.java
index acf5aebcd6c6..07387f1e5511 100644
--- a/android/source/src/java/org/libreoffice/storage/DocumentProviderFactory.java
+++ b/android/source/src/java/org/libreoffice/storage/DocumentProviderFactory.java
@@ -16,7 +16,6 @@ import org.libreoffice.storage.external.ExtsdDocumentsProvider;
import org.libreoffice.storage.external.OTGDocumentsProvider;
import org.libreoffice.storage.local.LocalDocumentsDirectoryProvider;
import org.libreoffice.storage.local.LocalDocumentsProvider;
-import org.libreoffice.storage.owncloud.OwnCloudProvider;
import android.content.Context;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
@@ -60,12 +59,10 @@ public final class DocumentProviderFactory {
instance = new DocumentProviderFactory();
// initialize document providers list
- instance.providers = new IDocumentProvider[5];
+ instance.providers = new IDocumentProvider[4];
instance.providers[0] = new LocalDocumentsDirectoryProvider(0);
instance.providers[1] = new LocalDocumentsProvider(1);
instance.providers[OTG_PROVIDER_INDEX] = new OTGDocumentsProvider(OTG_PROVIDER_INDEX, context);
- instance.providers[4] = new OwnCloudProvider(4, context);
-
instance.providers[EXTSD_PROVIDER_INDEX] = new ExtsdDocumentsProvider(EXTSD_PROVIDER_INDEX, context);
// initialize document provider names list
diff --git a/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java b/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
index b842e79fafd6..55656f9d6c55 100644
--- a/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
+++ b/android/source/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
@@ -25,9 +25,6 @@ import android.support.v7.app.AppCompatActivity;
public class DocumentProviderSettingsActivity extends AppCompatActivity {
- public static final String KEY_PREF_OWNCLOUD_SERVER = "pref_server_url";
- public static final String KEY_PREF_OWNCLOUD_USER_NAME = "pref_user_name";
- public static final String KEY_PREF_OWNCLOUD_PASSWORD = "pref_password";
public static final String KEY_PREF_EXTERNAL_SD_PATH_URI = "pref_extsd_path_uri";
public static final String KEY_PREF_OTG_PATH_URI = "pref_otg_path_uri";
diff --git a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
index 044d7ddb422b..4e82e250de55 100644
--- a/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
+++ b/android/source/src/java/org/libreoffice/storage/IDocumentProvider.java
@@ -53,8 +53,7 @@ public interface IDocumentProvider {
* Provides the unique ID for a document provider instance in a program.
*
* This ID should be set when the instance is built. It could be used to
- * tell two instances of the same document provider apart, e. g. two
- * instances of OwnCloudProvider pointing to different servers.
+ * tell two instances of the same document provider apart.
*
* @return Unique ID for a document provider instance.
*/
diff --git a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
deleted file mode 100644
index fa74a54b08e2..000000000000
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.libreoffice.storage.owncloud;
-
-import android.content.Context;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.libreoffice.storage.IFile;
-
-import com.owncloud.android.lib.common.operations.RemoteOperationResult;
-import com.owncloud.android.lib.resources.files.ChunkedUploadRemoteFileOperation;
-import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation;
-import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation;
-import com.owncloud.android.lib.resources.files.RemoteFile;
-import com.owncloud.android.lib.resources.files.UploadRemoteFileOperation;
-
-/**
- * Implementation of IFile for ownCloud servers.
- */
-public class OwnCloudFile implements IFile {
-
- private OwnCloudProvider provider;
- private RemoteFile file;
-
- private String name;
- private String parentPath;
-
- protected OwnCloudFile(OwnCloudProvider provider, RemoteFile file) {
- this.provider = provider;
- this.file = file;
-
- // get name and parent from path
- File localFile = new File(file.getRemotePath());
- this.name = localFile.getName();
- this.parentPath = localFile.getParent();
- }
-
- @Override
- public URI getUri(){
-
- try{
- return URI.create(URLEncoder.encode(file.getRemotePath(),"UTF-8"));
- }catch(UnsupportedEncodingException e){
- e.printStackTrace();
- }
-
- return null;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public boolean isDirectory() {
- return file.getMimeType().equals("DIR");
- }
-
- @Override
- public long getSize() {
- return file.getLength();
- }
-
- @Override
- public Date getLastModified() {
- return new Date(file.getModifiedTimestamp());
- }
-
- @Override
- public List<IFile> listFiles() {
- List<IFile> children = new ArrayList<IFile>();
- if (isDirectory()) {
- ReadRemoteFolderOperation refreshOperation = new ReadRemoteFolderOperation(
- file.getRemotePath());
- RemoteOperationResult result = refreshOperation.execute(provider
- .getClient());
- if (!result.isSuccess()) {
- throw provider.buildRuntimeExceptionForResultCode(result.getCode());
- }
- for (Object obj : result.getData()) {
- RemoteFile child = (RemoteFile) obj;
- if (!child.getRemotePath().equals(file.getRemotePath()))
- children.add(new OwnCloudFile(provider, child));
- }
- }
- return children;
- }
-
- @Override
- public List<IFile> listFiles(FileFilter filter) {
- List<IFile> children = new ArrayList<IFile>();
- if (isDirectory()) {
- ReadRemoteFolderOperation refreshOperation = new ReadRemoteFolderOperation(
- file.getRemotePath());
- RemoteOperationResult result = refreshOperation.execute(provider
- .getClient());
- if (!result.isSuccess()) {
- throw provider.buildRuntimeExceptionForResultCode(result.getCode());
- }
-
- for (Object obj : result.getData()) {
- RemoteFile child = (RemoteFile) obj;
- if (!child.getRemotePath().equals(file.getRemotePath())){
- OwnCloudFile ownCloudFile = new OwnCloudFile(provider, child);
- if(!ownCloudFile.isDirectory()){
- File f = new File(provider.getCacheDir().getAbsolutePath(),
- ownCloudFile.getName());
- if(filter.accept(f))
- children.add(ownCloudFile);
- f.delete();
- }else{
- children.add(ownCloudFile);
- }
- }
- }
- }
- return children;
- }
-
- @Override
- public IFile getParent(Context context) {
- if (parentPath == null)
- // this is the root node
- return null;
-
- return provider.createFromUri(context, URI.create(parentPath));
- }
-
- @Override
- public File getDocument() {
- if (isDirectory()) {
- return null;
- }
- File downFolder = provider.getCacheDir();
- DownloadRemoteFileOperation operation = new DownloadRemoteFileOperation(
- file.getRemotePath(), downFolder.getAbsolutePath());
- RemoteOperationResult result = operation.execute(provider.getClient());
- if (!result.isSuccess()) {
- throw provider.buildRuntimeExceptionForResultCode(result.getCode());
- }
- return new File(downFolder.getAbsolutePath() + file.getRemotePath());
- }
-
- @Override
- public boolean equals(Object object) {
- if (this == object)
- return true;
- if (!(object instanceof OwnCloudFile))
- return false;
- OwnCloudFile file = (OwnCloudFile) object;
- return file.getUri().equals(getUri());
- }
-
- @Override
- public void saveDocument(File newFile) {
- UploadRemoteFileOperation uploadOperation;
- if (newFile.length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE) {
- uploadOperation = new ChunkedUploadRemoteFileOperation(
- newFile.getPath(), file.getRemotePath(), file.getMimeType());
- } else {
- uploadOperation = new UploadRemoteFileOperation(newFile.getPath(),
- file.getRemotePath(), file.getMimeType());
- }
-
- RemoteOperationResult result = uploadOperation.execute(provider
- .getClient());
- if (!result.isSuccess()) {
- throw provider.buildRuntimeExceptionForResultCode(result.getCode());
- }
- }
-}
diff --git a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
deleted file mode 100644
index 0852ab617660..000000000000
--- a/android/source/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.libreoffice.storage.owncloud;
-
-import java.io.File;
-import java.net.URI;
-
-import org.libreoffice.R;
-import org.libreoffice.storage.DocumentProviderSettingsActivity;
-import org.libreoffice.storage.IDocumentProvider;
-import org.libreoffice.storage.IFile;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
-import android.net.Uri;
-import android.preference.PreferenceManager;
-
-import com.owncloud.android.lib.common.OwnCloudClient;
-import com.owncloud.android.lib.common.OwnCloudClientFactory;
-import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
-import com.owncloud.android.lib.resources.files.FileUtils;
-import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
-import com.owncloud.android.lib.resources.files.RemoteFile;
-
-
-/**
- * Implementation of IDocumentProvider for ownCloud servers.
- */
-public class OwnCloudProvider implements IDocumentProvider,
- OnSharedPreferenceChangeListener {
-
- private int id;
-
- private Context context;
- private OwnCloudClient client;
- private File cacheDir;
-
- private String serverUrl;
- private String userName;
- private String password;
- private RemoteOperationResult result;
-
- public OwnCloudProvider(int id, Context context) {
- this.id = id;
- this.context = context;
-
- // read preferences
- SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
- serverUrl = preferences.getString(
- DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_SERVER, "");
- userName = preferences.getString(
- DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_USER_NAME, "");
- password = preferences.getString(
- DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_PASSWORD, "");
-
- setupClient();
-
- // make sure cache directory exists, and clear it
- // TODO: probably we should do smarter cache management
- cacheDir = new File(context.getCacheDir(), "ownCloud");
- if (cacheDir.exists()) {
- deleteRecursive(cacheDir);
- }
- cacheDir.mkdirs();
- }
-
- private void setupClient() {
- Uri serverUri = Uri.parse(serverUrl);
- client = OwnCloudClientFactory.createOwnCloudClient(serverUri, context,
- true);
- client.setCredentials(OwnCloudCredentialsFactory.newBasicCredentials(
- userName, password));
- }
-
- @Override
- public IFile getRootDirectory(Context context) {
- return createFromUri(context, URI.create(FileUtils.PATH_SEPARATOR));
- }
-
- @Override
- public IFile createFromUri(Context context, URI uri) {
- if(serverUrl != "" || userName != "" || password != ""){
- ReadRemoteFileOperation refreshOperation = new ReadRemoteFileOperation(
- uri.getPath());
- this.result = refreshOperation.execute(client);
- if (!result.isSuccess()) {
- throw buildRuntimeExceptionForResultCode(result.getCode());
- }
- if (result.getData().size() > 0) {
- return new OwnCloudFile(this, (RemoteFile) result.getData().get(0));
- }
- } else {
- throw buildRuntimeExceptionForResultCode(ResultCode.WRONG_CONNECTION);
- }
-
- return null;
- }
-
- @Override
- public int getNameResource() {
- return R.string.owncloud;
- }
-
- /**
- * Used by OwnCloudFiles to get a configured client to run their own
- * operations.
- *
- * @return configured OwnCloudClient.
- */
- protected OwnCloudClient getClient() {
- return client;
- }
-
- /**
- * Used by OwnCloudFiles to get the cache directory they should download
- * files to.
- *
- * @return cache directory.
- */
- protected File getCacheDir() {
- return cacheDir;
- }
-
- /**
- * Build the proper RuntimeException for some error result.
- *
- * @param code Result code got from some RemoteOperationResult.
- * @return exception with the proper internationalized error message.
- */
- protected RuntimeException buildRuntimeExceptionForResultCode(ResultCode code) {
- int errorMessage;
- switch (code) {
- case WRONG_CONNECTION: // SocketException
- case FILE_NOT_FOUND: // HTTP 404
- errorMessage = R.string.owncloud_wrong_connection;
- break;
- case UNAUTHORIZED: // wrong user/pass
- errorMessage = R.string.owncloud_unauthorized;
- break;
- default:
- errorMessage = R.string.owncloud_unspecified_error;
- break;
- }
- return new RuntimeException(context.getString(errorMessage));
- }
-
- /**
- * Deletes files and recursively deletes directories.
- *
- * @param file
- * File or directory to be deleted.
- */
- private static void deleteRecursive(File file) {
- if (file.isDirectory()) {
- for (File child : file.listFiles())
- deleteRecursive(child);
- }
- file.delete();
- }
-
- @Override
- public void onSharedPreferenceChanged(SharedPreferences preferences,
- String key) {
- boolean changed = false;
- if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_SERVER)) {
- serverUrl = preferences.getString(key, "");
- changed = true;
- }
- else if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_USER_NAME)) {
- userName = preferences.getString(key, "");
- changed = true;
- }
- else if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_PASSWORD)) {
- password = preferences.getString(key, "");
- changed = true;
- }
-
- if (changed)
- setupClient();
- }
-
- @Override
- public int getId() {
- return id;
- }
-
- @Override
- public boolean checkProviderAvailability(Context context) {
- return client != null;
- }
-}
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index a9d797c4bf28..f52972b86f26 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -277,11 +277,6 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
return true;
}
- case R.id.menu_provider_owncloud: {
- switchToDocumentProvider(documentProviderFactory.getProvider(4));
- return true;
- }
-
default:
return false;
}
commit 1c2700e55dc3b045bc09b539705b5c8b43fe0f38
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Mar 19 10:07:12 2021 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Mar 22 08:45:00 2021 +0100
android: Update obj path in README
... according to the changes done in
commit 0dffc65236fbacf98047d6dbfc82b4efe7dd959b
Date: Fri Jun 5 08:59:26 2020 -0400
android: fix the build output directory
When compiling in a different build output directory,
the "liblo-native-code.so" file is created in the source directory and
it fails compiling the "online" project
Change-Id: I886231034bbe3937748d9b5ef56239aea3cf7b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112702
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit b0d1ad82e33868683edd7a1e50f516f38d0634b0)
diff --git a/android/README b/android/README
index 2e2fe5a434e8..e7e5c03faaf4 100644
--- a/android/README
+++ b/android/README
@@ -241,7 +241,7 @@ Using lldb from within Android Studio is more comfortable though and works like
- make sure you select the right build variant (strippedUIDebug is what you want)
- use Run|Edit Configurations to create a new configuration of type "Android Native"
- on tab "General" pick module "source"
- - on tab "Native Debugger" add android/source/obj/local/<hostarch> to
+ - on tab "Native Debugger" add android/obj/local/<hostarch> to
the Symbol directories
- on the LLDB startup commands tab add
"command script import /path/to/solenv/lldb/libreoffice/LO.py"
More information about the Libreoffice-commits
mailing list