change sync interval on change in code

This commit is contained in:
Adithya Abraham Philip
2016-03-24 19:40:18 +05:30
parent f005bbad96
commit 4b6df7d17c
4 changed files with 63 additions and 12 deletions

View File

@@ -100,6 +100,11 @@ public class KeychainApplication extends Application {
// Add OpenKeychain account to Android to link contacts with keys and keyserver sync
createAccountIfNecessary(this);
if (Preferences.getKeyserverSyncEnabled(this)) {
// will update a keyserver sync if the interval has changed
KeyserverSyncAdapterService.enableKeyserverSync(this);
}
// if first time, enable keyserver and contact sync
if (Preferences.getPreferences(this).isFirstTime()) {
KeyserverSyncAdapterService.enableKeyserverSync(this);