Fix SecurityException on Android 6 due to remove contacts on disabled sync

This commit is contained in:
Dominik Schürmann
2016-02-09 21:14:07 +01:00
parent b44f73c819
commit c22e2baa79
3 changed files with 12 additions and 5 deletions

View File

@@ -129,7 +129,7 @@ public class KeychainApplication extends Application {
Account account = new Account(Constants.ACCOUNT_NAME, Constants.ACCOUNT_TYPE);
if (accounts.length == 0) {
if (!manager.addAccountExplicitly(account, null, null)) {
Log.d(Constants.TAG, "account already exists, the account is null, or another error occured");
Log.d(Constants.TAG, "error when adding account via addAccountExplicitly");
return null;
} else {
return account;