aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-08-20 19:59:45 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-08-20 19:59:45 +0200
commit475293a116b5c3f7937bc5075921a2a0cb9c9a29 (patch)
treed1cb792bf5fe5ff651a4ec20df570b603f61a009 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
parent2a96912a96f6b740c40331fb83f715d4d1abf597 (diff)
downloadopen-keychain-475293a116b5c3f7937bc5075921a2a0cb9c9a29.tar.gz
open-keychain-475293a116b5c3f7937bc5075921a2a0cb9c9a29.tar.bz2
open-keychain-475293a116b5c3f7937bc5075921a2a0cb9c9a29.zip
consolidate: prevent concurrent calls of step 2
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
index 964a15d58..ead29e229 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java
@@ -86,21 +86,26 @@ public class KeychainApplication extends Application {
setupAccountAsNeeded(this);
// Update keyserver list as needed
- Preferences prefs = Preferences.getPreferences(this);
-
- prefs.updatePreferences();
+ Preferences.getPreferences(this).updatePreferences();
TlsHelper.addStaticCA("pool.sks-keyservers.net", getAssets(), "sks-keyservers.netCA.cer");
TemporaryStorageProvider.cleanUp(this);
+ checkConsolidateRecovery();
+
+ }
+
+ public void checkConsolidateRecovery() {
+
// restart consolidate process if it has been interruped before
- if (prefs.getCachedConsolidate()) {
+ if (Preferences.getPreferences(this).getCachedConsolidate()) {
// do something which calls ProviderHelper.consolidateDatabaseStep2 with a progressable
Intent consolidateIntent = new Intent(this, ConsolidateDialogActivity.class);
consolidateIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(consolidateIntent);
}
+
}
public static void setupAccountAsNeeded(Context context) {