[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/AndroidManifest.xml |1 - 1 file changed, 1 deletion(-) New commits: commit 96c8ac2cf88cb6ce19bdff8f7fffaf9f6ca9656f Author: Michael Weghorn AuthorDate: Mon Mar 22 11:48:47 2021 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 23 06:57:43 2021 +0100 Related tdf#129833 android: Drop android.permission.INTERNET The permission was requested since ownCloud support was added in commit 69773f54bbac08953f0fbce16eecea0816e04338 ("Android: initial implementation of ownCloud provider.", 2015-01-21). Since the custom ownCloud support has been dropped in commit 6012599e17206ee7be9a83477654e7bd194079c3 ("tdf#129833 android: Drop non-working ownCloud/nextCloud support"), there should no longer be any need to require Internet access, so drop the permission again. Access to ownCloud and other Internet services providing file access now goes via DocumentProviders, and the corresponding apps providing those should take care of being allowed to access the internet by themselves. I tested that opening and editing a file located on a NextCloud share still works OK when the NextCloud app is installed and set up. Change-Id: Id8425e7afcd5ecc26d14ba9f42018f536d0a6a6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112879 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 76a30ac646faf1c638736c10e834bb7b0ed243ef) diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 58da19119828..ae37c4fe8054 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -9,7 +9,6 @@ - https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/src/java/org/libreoffice/LOKitThread.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6b15b6d5e80f15a15838cdbde979f5b8319e090a Author: Michael Weghorn AuthorDate: Thu Mar 18 13:59:14 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 16:13:53 2021 +0100 tdf#125318 android: Allow copying with editing disabled Don't make the possibility to select and copy text depending on editing being enabled, i.e. experimental mode being enabled in Android Viewer. In a quick test, this worked just fine in read-only mode as well, so tapping on text in a document now shows two cursors around the tapped word, and allows adapting the selection using these and copying to the clipboard by using the corresponding toolbar entry. Change-Id: Icbd9d055a6cc700b78711df178f594c7a9c5cfbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112673 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 88f4b76270c26ab1d99c14f68cdcbea4b6ee9031) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112627 Tested-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LOKitThread.java b/android/source/src/java/org/libreoffice/LOKitThread.java index e554f0800cf0..03b7070e783a 100644 --- a/android/source/src/java/org/libreoffice/LOKitThread.java +++ b/android/source/src/java/org/libreoffice/LOKitThread.java @@ -448,7 +448,7 @@ class LOKitThread extends Thread { boolean editing = LOKitShell.isEditingEnabled(); float zoomFactor = mViewportMetrics.getZoomFactor(); -if (touchType.equals("LongPress") && editing) { +if (touchType.equals("LongPress")) { mInvalidationHandler.changeStateTo(InvalidationHandler.OverlayState.TRANSITION); mTileProvider.mouseButtonDown(documentCoordinate, 1, zoomFactor); mTileProvider.mouseButtonUp(documentCoordinate, 1, zoomFactor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 32 +- 1 file changed, 31 insertions(+), 1 deletion(-) New commits: commit e2d2c38d06dc514ee417ed006ed0f13173d186d6 Author: Michael Weghorn AuthorDate: Wed Mar 17 14:52:26 2021 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 18 10:21:38 2021 +0100 android: Show original instead of temp file name When a temporary file is created in Android Viewer (e.g. when a file is passed from another app, like a file explorer or an email app), still show the original file name in the toolbar, instead of the name of the temporary file (like "LibreOffice1588848072959345750.tmp"). Change-Id: I86f5cebfa8e2986fe812ace16c0df324d1420955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112643 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit a7c0039542fb015e34c56ec25f92f59a4c6ba1fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112621 Tested-by: Michael Weghorn diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index cbc628e94e48..a9a192099008 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -11,12 +11,14 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.res.AssetFileDescriptor; import android.content.res.AssetManager; +import android.database.Cursor; import android.graphics.RectF; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; +import android.provider.OpenableColumns; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.Snackbar; import android.support.v4.widget.DrawerLayout; @@ -192,7 +194,13 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin if (copyFileToTemp() && mTempFile != null) { mInputFile = mTempFile; Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); -toolbarTop.setTitle(mInputFile.getName()); + +String displayName = extractDisplayNameFromIntent(); +if (displayName.isEmpty()) { +// fall back to using temp file name +displayName = mInputFile.getName(); +} +toolbarTop.setTitle(displayName); } else { // TODO: can't open the file Log.e(LOGTAG, "couldn't create temporary file from " + getIntent().getData()); @@ -490,6 +498,28 @@ public class LibreOfficeMainActivity extends AppCompatActivity implements Settin } +/** + * Tries to retrieve display name for data in Intent, + * which should be the file name. + */ +private String extractDisplayNameFromIntent() { +String displayName = ""; +// try to retrieve original file name +Cursor cursor = null; +try { +String[] columns = {OpenableColumns.DISPLAY_NAME}; +cursor = getContentResolver().query(getIntent().getData(), columns, null, null); +if (cursor != null && cursor.moveToFirst()) { +displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); +} +} finally { +if (cursor != null) { +cursor.close(); +} +} +return displayName; +} + public List getDocumentPartView() { return mDocumentPartView; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - android/source
android/source/build.gradle |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 985a9551f47aac55b60ef452869c2b411313ef11 Author: Michael Weghorn AuthorDate: Tue Mar 16 08:41:12 2021 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 16 09:08:47 2021 +0100 tdf#141052 android: Include 'tabviewbar.ui' ... which has been added in commit e00fd78e6e454491014f03370e14efa5ebc2eefe Date: Thu Oct 22 19:41:17 2020 +0100 weld impress TabBarControl and is now needed by Impress in Android Viewer as well. Change-Id: I7fd89fa78a277d9da2121a47765107166ada1fd3 [Note: This is a partial cherry-pick/backport of pending Gerrit change https://gerrit.libreoffice.org/c/core/+/112557 ; only of the two commits mentioned in that one's commit message is already contained in 7-1 branch as well, so just one .ui file needs to be added here.] Conflicts: android/source/build.gradle Change-Id: I084655679eced073eed9db009cbbc598fce43eeb diff --git a/android/source/build.gradle b/android/source/build.gradle index 32de09f84749..637a0495ff2d 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -193,7 +193,8 @@ task copyAssets(type: Copy) { // 'headerfootermenu.ui' when clicking inside header/footer of document into('config') { from "${liboInstdir}/share/config" -include '**/pagebreakmenu.ui', '**/annotationmenu.ui', '**/headerfootermenu.ui' +include '**/pagebreakmenu.ui', '**/annotationmenu.ui', '**/headerfootermenu.ui', +'**/tabviewbar.ui' } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits