Home | History | Annotate | Download | only in email

Lines Matching refs:Account

28 import com.android.emailcommon.provider.Account;
36 * Base class for unit tests that use {@link android.accounts.Account}.
48 protected android.accounts.Account[] getExchangeAccounts() {
52 protected android.accounts.Account makeAccountManagerAccount(String username) {
53 return new android.accounts.Account(username, TEST_ACCOUNT_TYPE);
57 final android.accounts.Account account = makeAccountManagerAccount(username);
58 AccountManager.get(getContext()).addAccountExplicitly(account, "password", null);
61 protected Account setupProviderAndAccountManagerAccount(String username) {
63 // we need to use for the account manager
68 protected ArrayList<Account> makeExchangeServiceAccountList() {
69 ArrayList<Account> accountList = new ArrayList<Account>();
70 Cursor c = getMockContext().getContentResolver().query(Account.CONTENT_URI,
71 Account.CONTENT_PROJECTION, null, null, null);
74 Account account = new Account();
75 account.restore(c);
76 accountList.add(account);
84 protected void deleteAccountManagerAccount(android.accounts.Account account) {
86 AccountManager.get(getContext()).removeAccount(account, null, null);
96 for (android.accounts.Account accountManagerAccount: getExchangeAccounts()) {
114 * Helper to retrieve account manager accounts *and* remove any preexisting accounts
117 protected android.accounts.Account[] getAccountManagerAccounts(
118 android.accounts.Account[] baseline) {
119 android.accounts.Account[] rawList = getExchangeAccounts();
123 HashSet<android.accounts.Account> set = new HashSet<android.accounts.Account>();
124 for (android.accounts.Account addAccount : rawList) {
127 for (android.accounts.Account removeAccount : baseline) {
130 return set.toArray(new android.accounts.Account[0]);