From 7b1184ba218b49aea49c74adc1d797438b2953f0 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 2 Sep 2021 13:13:33 -0400 Subject: [PATCH] Refactor: Remove code that delete account on register new account --- .../kunder/accountmanager/AccountManagerPlugin.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/android/cl/kunder/accountmanager/AccountManagerPlugin.java b/src/android/cl/kunder/accountmanager/AccountManagerPlugin.java index 23ccdf0..145ec57 100644 --- a/src/android/cl/kunder/accountmanager/AccountManagerPlugin.java +++ b/src/android/cl/kunder/accountmanager/AccountManagerPlugin.java @@ -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);