From 8530783a10e467947f8698cf44d38313b5454cb2 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 14 Aug 2013 11:05:04 +0100 Subject: Bug 694516: Fix Android operation with passworded files. Don't countPages until after we have a password. --- platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'platform/android') diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java index ff38b22a..5590d1a1 100644 --- a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java +++ b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java @@ -306,13 +306,15 @@ public class MuPDFActivity extends Activity core = openFile(Uri.decode(uri.getEncodedPath())); } SearchTaskResult.set(null); - if (core.countPages() == 0) - core = null; } if (core != null && core.needsPassword()) { requestPassword(savedInstanceState); return; } + if (core != null && core.countPages() == 0) + { + core = null; + } } if (core == null) { -- cgit v1.2.3