mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 16:08:49 -05:00
No need for setSyncAutomatically, this is only for network tickles
This commit is contained in:
parent
f0ff8d2222
commit
0c1e65bc8b
@ -115,9 +115,11 @@ public class KeychainApplication extends Application {
|
||||
Account[] accounts = manager.getAccountsByType(Constants.ACCOUNT_TYPE);
|
||||
if (accounts == null || accounts.length == 0) {
|
||||
Account account = new Account(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE);
|
||||
manager.addAccountExplicitly(account, null, null);
|
||||
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1);
|
||||
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
|
||||
if (manager.addAccountExplicitly(account, null, null)) {
|
||||
ContentResolver.setIsSyncable(account, ContactsContract.AUTHORITY, 1);
|
||||
} else {
|
||||
Log.e(Constants.TAG, "Adding account failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user