summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-03-11 17:50:54 +0000
committerRobin Watts <robin.watts@artifex.com>2016-03-11 17:50:54 +0000
commite8afed7205f32d776ba406b167b5097d728da5f6 (patch)
treeaec2ca8cb44546d183da35f6161f6b9d74d63cdb
parent83423e5c044fc054cb219ef14798d30832cdd8e7 (diff)
downloadmupdf-e8afed7205f32d776ba406b167b5097d728da5f6.tar.xz
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.
-rw-r--r--platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java2
1 files changed, 1 insertions, 1 deletions
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);