diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-04-04 11:34:40 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-04-04 11:34:40 +0100 |
commit | 3c200119a59976f51bdfa17411baafec288b6744 (patch) | |
tree | cb5a7d289896939c09de2b52bf91b8bf65479f21 /android | |
parent | 2d5d9b8540a87a16f2cdf98827bc37682cabe4c9 (diff) | |
download | mupdf-3c200119a59976f51bdfa17411baafec288b6744.tar.xz |
Android: quicker response to print failure
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/PrintDialogActivity.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java b/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java index 8377255d..bcef1cbd 100644 --- a/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java +++ b/android/src/com/artifex/mupdfdemo/PrintDialogActivity.java @@ -1,8 +1,6 @@ package com.artifex.mupdfdemo; import java.io.ByteArrayOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import android.app.Activity; @@ -92,14 +90,10 @@ public class PrintDialogActivity extends Activity { baos.flush(); return Base64.encodeToString(baos.toByteArray(), Base64.DEFAULT); - } catch (FileNotFoundException e) { - resultCode = RESULT_CANCELED; - e.printStackTrace(); - } catch (IOException e) { - resultCode = RESULT_CANCELED; - e.printStackTrace(); - } catch (OutOfMemoryError e) { + } catch (Throwable e) { resultCode = RESULT_CANCELED; + setResult(resultCode); + finish(); e.printStackTrace(); } return ""; |