Home | History | Annotate | Download | only in exchange

Lines Matching refs:account

19 import android.accounts.Account;
49 private HashMap<Account, Boolean> origCalendarSyncStates = new HashMap<Account, Boolean>();
61 for (Account account : AccountManager.get(getContext()).getAccounts()) {
62 origCalendarSyncStates.put(account,
63 ContentResolver.getSyncAutomatically(account, CalendarContract.AUTHORITY));
77 for (Account account : getExchangeAccounts()) {
78 Boolean state = origCalendarSyncStates.get(account);
81 ContentResolver.setSyncAutomatically(account, CalendarContract.AUTHORITY, state);
86 final Account[] baseAccounts = getExchangeAccounts();
91 // 1. Test with 1 account
107 // Delete added account.
126 private static void checkNotificationEmailAddresses(String actual, Account[] baseAccounts,
134 for (Account account : baseAccounts) {
135 expected.add(account.name);
149 * For all {@link Account}, confirm that:
151 * <li>Calendar sync is enabled if it's an Exchange account.<br>
160 for (Account account : AccountManager.get(getContext()).getAccounts()) {
161 String message = "account=" + account.name + "(" + account.type + ")";
162 boolean enabled = ContentResolver.getSyncAutomatically(account,
164 int syncable = ContentResolver.getIsSyncable(account, CalendarContract.AUTHORITY);
166 if (EAT.equals(account.type)) {
172 assertEquals(message, origCalendarSyncStates.get(account), (Boolean) enabled);
183 + " It only runs when there's no Exchange account on the device.");
209 protected Account[] getExchangeAccounts() {
214 protected Account makeAccountManagerAccount(String username) {
215 return new Account(username, AccountManagerTypes.TYPE_EXCHANGE);
219 final Account account = makeAccountManagerAccount(username);
220 AccountManager.get(getContext()).addAccountExplicitly(account, "password", null);
223 protected com.android.emailcommon.provider.Account
226 // we need to use for the account manager
231 protected ArrayList<com.android.emailcommon.provider.Account> makeExchangeServiceAccountList() {
232 ArrayList<com.android.emailcommon.provider.Account> accountList =
233 new ArrayList<com.android.emailcommon.provider.Account>();
235 com.android.emailcommon.provider.Account.CONTENT_URI,
236 com.android.emailcommon.provider.Account.CONTENT_PROJECTION, null, null, null);
239 com.android.emailcommon.provider.Account account =
240 new com.android.emailcommon.provider.Account();
241 account.restore(c);
242 accountList.add(account);
250 protected void deleteAccountManagerAccount(Account account) {
252 AccountManager.get(getContext()).removeAccount(account, null, null);
262 for (Account accountManagerAccount: getExchangeAccounts()) {
280 * Helper to retrieve account manager accounts *and* remove any preexisting accounts
283 protected Account[] getAccountManagerAccounts(Account[] baseline) {
284 Account[] rawList = getExchangeAccounts();
288 HashSet<Account> set = new HashSet<Account>();
289 for (Account addAccount : rawList) {
292 for (Account removeAccount : baseline) {
295 return set.toArray(new Account[0]);