From 39d96445ce65da3fb36ee5af3e99fab143af476f Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Tue, 21 Feb 2012 13:44:13 +0000 Subject: Android app: decode the uri before using as a file name --- android/src/com/artifex/mupdf/MuPDFActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'android/src/com') 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; -- cgit v1.2.3