From b981cd0efd8d4c8faff13085226c9863ead8e15b Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 13 Oct 2019 11:48:38 +0200 Subject: [PATCH] Fix crash when enabling openpgp In onDismiss, getActivity returns null if the fragment is covered by the chooser intent (F-Droid vs Google Play). --- .../com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java index d94bc56b8..376f8b0fb 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java @@ -297,8 +297,8 @@ public class OpenPgpAppSelectDialog extends FragmentActivity { builder.setPositiveButton(R.string.dialog_openkeychain_info_install, new OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { - startOpenKeychainInstallActivity(); dismiss(); + startOpenKeychainInstallActivity(); } });