From e8afed7205f32d776ba406b167b5097d728da5f6 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 11 Mar 2016 17:50:54 +0000 Subject: Bug 696634: Android: Allow filenames including hash. We were converting from a File to a filename then to a Uri using Uri.parse, but Uri.parse has problems with hash marks. Instead convert direct from File to Uri. --- platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/android/src') diff --git a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java b/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java index da7eafb8..f6068bac 100644 --- a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java +++ b/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java @@ -201,7 +201,7 @@ public class ChoosePDFActivity extends ListActivity { position -= mDirs.length; - Uri uri = Uri.parse(mFiles[position].getAbsolutePath()); + Uri uri = Uri.fromFile(mFiles[position]); Intent intent = new Intent(this,MuPDFActivity.class); intent.setAction(Intent.ACTION_VIEW); intent.setData(uri); -- cgit v1.2.3