diff options
-rw-r--r-- | platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java | 3 | ||||
-rw-r--r-- | platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java b/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java index f9428dc8..4ab0618e 100644 --- a/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java +++ b/platform/android/src/com/artifex/mupdfdemo/ChoosePDFActivity.java @@ -27,6 +27,7 @@ enum Purpose { } public class ChoosePDFActivity extends ListActivity { + static public final String PICK_KEY_FILE = "com.artifex.mupdfdemo.PICK_KEY_FILE"; static private File mDirectory; static private Map<String, Integer> mPositions = new HashMap<String, Integer>(); private File mParent; @@ -41,7 +42,7 @@ public class ChoosePDFActivity extends ListActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - mPurpose = Intent.ACTION_MAIN.equals(getIntent().getAction()) ? Purpose.PickPDF : Purpose.PickKeyFile; + mPurpose = PICK_KEY_FILE.equals(getIntent().getAction()) ? Purpose.PickKeyFile : Purpose.PickPDF; String storageState = Environment.getExternalStorageState(); diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java index db0bb3fb..e9922a34 100644 --- a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java +++ b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java @@ -1107,6 +1107,7 @@ public class MuPDFActivity extends Activity implements FilePicker.FilePickerSupp public void performPickFor(FilePicker picker) { mFilePicker = picker; Intent intent = new Intent(this, ChoosePDFActivity.class); + intent.setAction(ChoosePDFActivity.PICK_KEY_FILE); startActivityForResult(intent, FILEPICK_REQUEST); } } |