[Libreoffice-commits] core.git: android/source
Mert Tumer
merttumer at outlook.com
Thu Jul 12 13:42:37 UTC 2018
android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 12 +++++-----
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 61b981e2682872e9ff45dc3c13d51875b1cd5ae3
Author: Mert Tumer <merttumer at outlook.com>
Date: Fri Jul 6 07:56:33 2018 -0700
Fix endless loop when selecting remote server on Android Viewer
Switching document provider when exception thrown casues
endless loop.
Signed-off-by: Mert Tumer <merttumer at outlook.com>
Change-Id: Ie34080abdf7b8d6a48cd96785700b7bd91910512
Reviewed-on: https://gerrit.libreoffice.org/57070
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index d7b0ab41c015..0202e0797b63 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -432,10 +432,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
// these operations may imply network access and must be run in
// a different thread
try {
- documentProvider = provider[0];
- homeDirectory = documentProvider.getRootDirectory(LibreOfficeUIActivity.this);
- currentDirectory = homeDirectory;
- List<IFile> paths = currentDirectory.listFiles(FileUtilities
+ homeDirectory = provider[0].getRootDirectory(LibreOfficeUIActivity.this);
+ List<IFile> paths = homeDirectory.listFiles(FileUtilities
.getFileFilter(filterMode));
filePaths = new ArrayList<IFile>();
for(IFile file: paths) {
@@ -455,13 +453,15 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
public void run() {
Toast.makeText(activity, e.getMessage(),
Toast.LENGTH_SHORT).show();
- // switch back to the default provider.
- switchToDocumentProvider(documentProviderFactory.getDefaultProvider());
}
});
startActivity(new Intent(activity, DocumentProviderSettingsActivity.class));
Log.e(LOGTAG, "failed to switch document provider "+ e.getMessage(), e.getCause());
+ return null;
}
+ //no exception
+ documentProvider = provider[0];
+ currentDirectory = homeDirectory;
return null;
}
More information about the Libreoffice-commits
mailing list