[Libreoffice-commits] online.git: android/app
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 2 17:08:57 UTC 2020
android/app/src/main/java/org/libreoffice/androidapp/ui/FileUtilities.java | 1 +
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 5733c3cf7816cd4d7d031fbe7bf58955a37330da
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jan 2 16:55:42 2020 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Jan 2 18:08:36 2020 +0100
android: Avoid crash with unknown file types, and add .txt.
Change-Id: If5c04d5c3c6cd11c7231e59a91ac1649dbb11b88
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86135
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/FileUtilities.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/FileUtilities.java
index 1ca28de45..226d38baa 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/FileUtilities.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/FileUtilities.java
@@ -101,6 +101,7 @@ public class FileUtilities {
// Other
mExtnMap.put(".csv", CALC);
+ mExtnMap.put(".txt", DOC);
mExtnMap.put(".wps", DOC);
mExtnMap.put(".key", IMPRESS);
mExtnMap.put(".abw", DOC);
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index 6ad8aba48..a66c54b04 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -72,7 +72,9 @@ class RecentFilesAdapter extends RecyclerView.Adapter<RecentFilesAdapter.ViewHol
compoundDrawableInt = R.drawable.impress;
break;
}
- holder.imageView.setImageDrawable(ContextCompat.getDrawable(mActivity, compoundDrawableInt));
+
+ if (compoundDrawableInt != 0)
+ holder.imageView.setImageDrawable(ContextCompat.getDrawable(mActivity, compoundDrawableInt));
}
@Override
More information about the Libreoffice-commits
mailing list