diff options
author | Paul Gardiner <paul@glidos.net> | 2012-02-21 13:44:13 +0000 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-02-21 17:38:23 +0100 |
commit | 39d96445ce65da3fb36ee5af3e99fab143af476f (patch) | |
tree | 32c97c9b690ba911dabd8a356b7ab4e05aa2ce67 /android | |
parent | ac4d79ba18f64b4fdf48f554aede934d87f8af99 (diff) | |
download | mupdf-39d96445ce65da3fb36ee5af3e99fab143af476f.tar.xz |
Android app: decode the uri before using as a file name
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdf/MuPDFActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/android/src/com/artifex/mupdf/MuPDFActivity.java b/android/src/com/artifex/mupdf/MuPDFActivity.java index 6141c464..69cfa271 100644 --- a/android/src/com/artifex/mupdf/MuPDFActivity.java +++ b/android/src/com/artifex/mupdf/MuPDFActivity.java @@ -7,6 +7,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.RectF; +import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.text.Editable; @@ -100,7 +101,7 @@ public class MuPDFActivity extends Activity if (core == null) { Intent intent = getIntent(); if (Intent.ACTION_VIEW.equals(intent.getAction())) - core = openFile(intent.getData().getEncodedPath()); + core = openFile(Uri.decode(intent.getData().getEncodedPath())); if (core != null && core.needsPassword()) { requestPassword(savedInstanceState); return; |