diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-01-24 19:26:26 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-01-26 17:26:54 +0000 |
commit | 0cbf73e579846395c7b9f7ebd3f3f229d99104ac (patch) | |
tree | ad21e1587baabc1316989fa2bcbcd4b7f7851378 /android/res | |
parent | e6f5e24b5d145cb571f82b2e01178be4c3eff662 (diff) | |
download | mupdf-0cbf73e579846395c7b9f7ebd3f3f229d99104ac.tar.xz |
Android: Fix NullPointerException seen on Google Play
According to Google Plays automated crash detection, we get a
NullPointerException when trying to parse a null string as a
Uri.
This turns out to be caused by us trying to open a PDF attachment
from gmail. This is because MuPDF is invoked with a content:// URL
that does not have a file associated with it. Instead we can open
that URL as an InputStream.
Here we amend MuPDF to spot that case, and to open the InputStream,
suck the data into a byteArray, and then to use that to open the
file from.
Diffstat (limited to 'android/res')
-rw-r--r-- | android/res/values/strings.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml index 72794bcc..1468d963 100644 --- a/android/res/values/strings.xml +++ b/android/res/values/strings.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">MuPDF</string> - <string name="version">1.1</string> + <string name="version">1.1 (Build 6)</string> <string name="no_media_warning">Storage Media not present</string> <string name="no_media_hint">Sharing the storage media with a PC can make it inaccessible</string> <string name="open_failed">Unable to open document</string> + <string name="content_failure">%1$s: %2$s</string> <string name="cancel">Cancel</string> <string name="search_backwards">Search backwards</string> <string name="search_forwards">Search forwards</string> |