summaryrefslogtreecommitdiff
path: root/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
AgeCommit message (Collapse)Author
2014-07-02Pass mimetype when opening a document from a stream.Matt Holgate
Fixes opening non-PDF files from email programs that use a ContentProvider to supply attachments.
2014-07-02Fix opening files from Email app.Matt Holgate
On 2.3.x, opening files from the Android email app (not Gmail), was causing a crash due to a SecurityException. On 4.x, it was failing with an error message. I think we should have just been calling getContentResolver().openInputStream(uri) to get the file data, rather than reading the row from the content resolver and looking at the _data field. On 2.3.x querying this row caused a security error. On 4.x, we got back a _data field containing a path, but this path was internal to the email app, and not for our consumption. Previously we were calling openInputStream() only as a fallback; now we try it first, and fall back to the other method if that fails. I suspect we can delete the other code, but I can't test on the 3.x version of the Transformer Prime, so I'm leaving it be for now.
2014-06-27Fix #695217 - don't allow annotation of encrypted PDFsMatt Holgate
2014-06-23Fix crash when dismissing 'Cannot open document' dialog with back button, ↵Matt Holgate
then pressing back button again. I've also added an onCancel() handler, so that the back button only needs to be pressed once to return to the file picker view. Spotted while looking at bug #693719 - Attached PDF file does not display (edit)
2014-04-22Tweak Intent usage for ChoosePDFActivityRobin Watts
ChoosePDFActivity can be used either to select PDF/XPS etc files, or to select key files (for digital signatures). The choice of which one to use is made according to the action string in the Intent with which the activity is invoked. Previously we would look for Intent.action.MAIN and take this to mean "Look for PDF files", and anything else to mean look for key files. Unfortunately, if you start the activity directly using adb then the action string is null, so we look for key files. The fix is to use a specific (custom) string for key files and for everything else to be treated as a request for PDF files.
2014-04-01Solve crash (NullPointerException) when cancelling from password promptRobin Watts
Attempt to open a file that needs a password, and you will get a dialogue box. Hit cancel on this, and the program crashes. This is due to an attempt to release the bitmaps on a document view that does not exist. Simple fix.
2013-09-16Android: remove use of Bitmap holder and avoid memory churnPaul Gardiner
Now use one-time allocation of page-sized bitmaps
2013-08-27Android: support signingPaul Gardiner
2013-08-27Android: add signature checkingPaul Gardiner
2013-08-14Bug 694516: Fix Android operation with passworded files.Robin Watts
Don't countPages until after we have a password.
2013-06-20Rearrange source files.Tor Andersson