From f6643962afdf980fe50740eb3c667bf280c15c56 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 16 May 2015 23:29:59 +0200 Subject: [PATCH] allow state loss when yubikey fragment is loaded --- .../org/sufficientlysecure/keychain/ui/ViewKeyActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java index 8c1d23d68..320ccee5d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java @@ -596,7 +596,8 @@ public class ViewKeyActivity extends BaseNfcActivity implements manager.beginTransaction() .addToBackStack("yubikey") .replace(R.id.view_key_fragment, frag) - .commit(); + // if this is called while the activity wasn't resumed, just forget it happened + .commitAllowingStateLoss(); } private void encrypt(Uri dataUri, boolean text) {