private boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) { if (account == null) { return false; } synchronized (accountsByUserId) { VAccount vAccount = new VAccount(userId, account); vAccount.password = password; // convert the [Bundle] to [Map<String, String>] if (extras != null) { for (String key : extras.keySet()) { Object value = extras.get(key); if (value instanceof String) { vAccount.userDatas.put(key, (String) value); } } } List<VAccount> accounts = accountsByUserId.get(userId); if (accounts == null) { accounts = new ArrayList<>(); accountsByUserId.put(userId, accounts); } accounts.add(vAccount); saveAllAccounts(); sendAccountsChangedBroadcast(vAccount.userId); return true; } }
accountsByUserId.put(userId, accounts); account = new VAccount(userId, new Account(name, type)); accounts.add(account); saveAllAccounts();
boolean invalid = false; while (size-- > 0) { VAccount account = new VAccount(dest); VLog.d(TAG, "Reading account : " + account.type); AuthenticatorInfo info = cache.authenticators.get(account.type);
private boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) { if (account == null) { return false; } synchronized (accountsByUserId) { VAccount vAccount = new VAccount(userId, account); vAccount.password = password; // convert the [Bundle] to [Map<String, String>] if (extras != null) { for (String key : extras.keySet()) { Object value = extras.get(key); if (value instanceof String) { vAccount.userDatas.put(key, (String) value); } } } List<VAccount> accounts = accountsByUserId.get(userId); if (accounts == null) { accounts = new ArrayList<>(); accountsByUserId.put(userId, accounts); } accounts.add(vAccount); saveAllAccounts(); sendAccountsChangedBroadcast(vAccount.userId); return true; } }
private boolean insertAccountIntoDatabase(int userId, Account account, String password, Bundle extras) { if (account == null) { return false; } synchronized (accountsByUserId) { VAccount vAccount = new VAccount(userId, account); vAccount.password = password; // convert the [Bundle] to [Map<String, String>] if (extras != null) { for (String key : extras.keySet()) { Object value = extras.get(key); if (value instanceof String) { vAccount.userDatas.put(key, (String) value); } } } List<VAccount> accounts = accountsByUserId.get(userId); if (accounts == null) { accounts = new ArrayList<>(); accountsByUserId.put(userId, accounts); } accounts.add(vAccount); saveAllAccounts(); sendAccountsChangedBroadcast(vAccount.userId); return true; } }
accountsByUserId.put(userId, accounts); account = new VAccount(userId, new Account(name, type)); accounts.add(account); saveAllAccounts();
accountsByUserId.put(userId, accounts); account = new VAccount(userId, new Account(name, type)); accounts.add(account); saveAllAccounts();
boolean invalid = false; while (size-- > 0) { VAccount account = new VAccount(dest); VLog.d(TAG, "Reading account : " + account.type); AuthenticatorInfo info = cache.authenticators.get(account.type);
boolean invalid = false; while (size-- > 0) { VAccount account = new VAccount(dest); VLog.d(TAG, "Reading account : " + account.type); AuthenticatorInfo info = cache.authenticators.get(account.type);