diff options
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
2 files changed, 9 insertions, 9 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); - } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java index f74e4fdd6..3e949cfae 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java @@ -19,8 +19,6 @@ package org.sufficientlysecure.keychain.ui; import android.annotation.TargetApi; import android.app.ProgressDialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.net.Uri; import android.nfc.NdefMessage; @@ -52,7 +50,7 @@ import org.sufficientlysecure.keychain.service.OperationResultParcel; import org.sufficientlysecure.keychain.service.OperationResults.ImportKeyResult; import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter; import org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout; -import org.sufficientlysecure.keychain.util.FileImportCache; +import org.sufficientlysecure.keychain.util.ParcelableFileCache; import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Notify; @@ -505,8 +503,8 @@ public class ImportKeysActivity extends ActionBarActivity { // to prevent Java Binder problems on heavy imports // read FileImportCache for more info. try { - FileImportCache<ParcelableKeyRing> cache = - new FileImportCache<ParcelableKeyRing>(this, "key_import.pcl"); + ParcelableFileCache<ParcelableKeyRing> cache = + new ParcelableFileCache<ParcelableKeyRing>(this, "key_import.pcl"); cache.writeCache(selectedEntries); intent.putExtra(KeychainIntentService.EXTRA_DATA, data); |