aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-09-09 09:26:03 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-09-09 09:26:03 +0200
commit7c67f7a7154cc4da2c53aeb338d9bff2cbc3985a (patch)
treee87d4c549dc44906ebbb75a60b3f3937a19c8282 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java
parentc344158c3789180d9ca273f59e32076c6ae81272 (diff)
downloadopen-keychain-7c67f7a7154cc4da2c53aeb338d9bff2cbc3985a.tar.gz
open-keychain-7c67f7a7154cc4da2c53aeb338d9bff2cbc3985a.tar.bz2
open-keychain-7c67f7a7154cc4da2c53aeb338d9bff2cbc3985a.zip
Consolidate on database upgrade
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java
index edc05e28d..0d8905c5b 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ConsolidateDialogActivity.java
@@ -34,17 +34,20 @@ import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler;
*/
public class ConsolidateDialogActivity extends FragmentActivity {
+ public static final String EXTRA_CONSOLIDATE_RECOVERY = "consolidate_recovery";
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// this activity itself has no content view (see manifest)
- consolidateRecovery();
+ boolean recovery = getIntent().getBooleanExtra(EXTRA_CONSOLIDATE_RECOVERY, false);
+ consolidateRecovery(recovery);
}
- private void consolidateRecovery() {
+ private void consolidateRecovery(boolean recovery) {
// Message is received after importing is done in KeychainIntentService
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(
this,
@@ -81,7 +84,7 @@ public class ConsolidateDialogActivity extends FragmentActivity {
// fill values for this action
Bundle data = new Bundle();
- data.putBoolean(KeychainIntentService.CONSOLIDATE_RECOVERY, true);
+ data.putBoolean(KeychainIntentService.CONSOLIDATE_RECOVERY, recovery);
intent.putExtra(KeychainIntentService.EXTRA_DATA, data);
// Create a new Messenger for the communication back
@@ -93,7 +96,6 @@ public class ConsolidateDialogActivity extends FragmentActivity {
// start service with intent
startService(intent);
-
}
}