Skip to content

Commit

Permalink
Refactor: Remove code that delete account on register new account
Browse files Browse the repository at this point in the history
  • Loading branch information
fmariqueo-kunder committed Sep 2, 2021
1 parent 2f146c2 commit 7b1184b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/android/cl/kunder/accountmanager/AccountManagerPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,6 @@ else if (action.equals("addAccount")) {

Account [] accounts = accountManager.getAccountsByType(accountType);

if(accounts.length == 1) {
// Remove existing account
if(Build.VERSION.SDK_INT >= 22){
accountManager.removeAccountExplicitly(accounts[0]);
}
else{
//Deprecated on API 22
accountManager.removeAccount(accounts[0], null, null);
}
// Refresh accounts array
accounts = accountManager.getAccountsByType(accountType);
}

if(accounts.length == 0){
//No hay cuentas, entonces es posible añadir una
Account account = new Account(userAccount, accountType);
Expand Down

0 comments on commit 7b1184b

Please sign in to comment.