Move Eas.ACCOUNT_MANAGER_TYPE out of the package.
Moved Eas.ACCOUNT_MANAGER_TYPE to Email.EXCHANGE_ACCOUNT_MANAGER_TYPE. This constant is not related to the exchange protocol, and referred in a lot of different places. Moving it out of the package will make it a lot simpler when removing exchange dependency.
This commit is contained in:
parent
b89bc81f54
commit
faed6178b1
|
@ -110,7 +110,7 @@ public class AccountBackupRestore {
|
|||
// Determine if contacts are also synced, and if so, record that
|
||||
if (fromAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
||||
android.accounts.Account acct = new android.accounts.Account(
|
||||
fromAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
fromAccount.mEmailAddress, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
boolean syncContacts = ContentResolver.getSyncAutomatically(acct,
|
||||
ContactsContract.AUTHORITY);
|
||||
if (syncContacts) {
|
||||
|
|
|
@ -144,6 +144,8 @@ public class Email extends Application {
|
|||
private static HashMap<Long, Long> sMailboxSyncTimes = new HashMap<Long, Long>();
|
||||
private static final long UPDATE_INTERVAL = 5 * DateUtils.MINUTE_IN_MILLIS;
|
||||
|
||||
public static final String EXCHANGE_ACCOUNT_MANAGER_TYPE = "com.android.exchange";
|
||||
|
||||
/**
|
||||
* Called throughout the application when the number of accounts has changed. This method
|
||||
* enables or disables the Compose activity, the boot receiver and the service based on
|
||||
|
|
|
@ -247,8 +247,8 @@ public class AccountSettings extends PreferenceActivity {
|
|||
|
||||
mSyncContacts = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_CONTACTS);
|
||||
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
||||
android.accounts.Account acct =
|
||||
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
android.accounts.Account acct = new android.accounts.Account(mAccount.mEmailAddress,
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
mSyncContacts.setChecked(ContentResolver
|
||||
.getSyncAutomatically(acct, ContactsContract.AUTHORITY));
|
||||
} else {
|
||||
|
@ -318,8 +318,8 @@ public class AccountSettings extends PreferenceActivity {
|
|||
mAccount.setFlags(newFlags);
|
||||
|
||||
if (mAccount.mHostAuthRecv.mProtocol.equals("eas")) {
|
||||
android.accounts.Account acct =
|
||||
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
android.accounts.Account acct = new android.accounts.Account(mAccount.mEmailAddress,
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
ContentResolver.setSyncAutomatically(acct, ContactsContract.AUTHORITY,
|
||||
mSyncContacts.isChecked());
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.android.email.mail.store;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.mail.AuthenticationFailedException;
|
||||
import com.android.email.mail.Folder;
|
||||
import com.android.email.mail.MessagingException;
|
||||
|
@ -92,8 +93,8 @@ public class ExchangeStore extends Store {
|
|||
// Here's where we tell AccountManager about the new account. The addAccount
|
||||
// method in AccountManager calls the addAccount method in our authenticator
|
||||
// service (EasAuthenticatorService)
|
||||
return AccountManager.get(context).addAccount(Eas.ACCOUNT_MANAGER_TYPE, null, null,
|
||||
options, null, callback, null);
|
||||
return AccountManager.get(context).addAccount(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE,
|
||||
null, null, options, null, callback, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -107,7 +108,7 @@ public class ExchangeStore extends Store {
|
|||
static public AccountManagerFuture<Boolean> removeSystemAccount(Context context, Account acct,
|
||||
AccountManagerCallback<Bundle> callback) {
|
||||
android.accounts.Account systemAccount =
|
||||
new android.accounts.Account(acct.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
new android.accounts.Account(acct.mEmailAddress, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
return AccountManager.get(context).removeAccount(systemAccount, null, null);
|
||||
}
|
||||
|
||||
|
|
|
@ -682,8 +682,8 @@ public class EmailProvider extends ContentProvider {
|
|||
// For versions prior to 5, delete all data
|
||||
// Versions >= 5 require that data be preserved!
|
||||
if (oldVersion < 5) {
|
||||
android.accounts.Account[] accounts =
|
||||
AccountManager.get(mContext).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE);
|
||||
android.accounts.Account[] accounts = AccountManager.get(mContext)
|
||||
.getAccountsByType(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
for (android.accounts.Account account: accounts) {
|
||||
AccountManager.get(mContext).removeAccount(account, null, null);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.android.email.service;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.activity.setup.AccountSetupBasics;
|
||||
import com.android.exchange.Eas;
|
||||
|
||||
|
@ -59,7 +60,7 @@ public class EasAuthenticatorService extends Service {
|
|||
if (options != null && options.containsKey(OPTIONS_PASSWORD)
|
||||
&& options.containsKey(OPTIONS_USERNAME)) {
|
||||
final Account account = new Account(options.getString(OPTIONS_USERNAME),
|
||||
Eas.ACCOUNT_MANAGER_TYPE);
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
AccountManager.get(EasAuthenticatorService.this).addAccountExplicitly(
|
||||
account, options.getString(OPTIONS_PASSWORD), null);
|
||||
|
||||
|
@ -85,7 +86,7 @@ public class EasAuthenticatorService extends Service {
|
|||
|
||||
Bundle b = new Bundle();
|
||||
b.putString(AccountManager.KEY_ACCOUNT_NAME, options.getString(OPTIONS_USERNAME));
|
||||
b.putString(AccountManager.KEY_ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
b.putString(AccountManager.KEY_ACCOUNT_TYPE, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
return b;
|
||||
// 2) The other case is that we're creating a new account from an Account manager
|
||||
// activity. In this case, we add an intent that will be used to gather the
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.android.exchange;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailContent.AccountColumns;
|
||||
import com.android.email.provider.EmailContent.Mailbox;
|
||||
|
@ -98,7 +99,7 @@ public class ContactsSyncAdapterService extends Service {
|
|||
if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_UPLOAD)) {
|
||||
Uri uri = RawContacts.CONTENT_URI.buildUpon()
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_NAME, account.name)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE)
|
||||
.build();
|
||||
Cursor c = cr.query(uri,
|
||||
new String[] {RawContacts._ID}, RawContacts.DIRTY + "=1", null, null);
|
||||
|
|
|
@ -38,7 +38,6 @@ public class Eas {
|
|||
public static final int DEBUG_FILE_BIT = 4;
|
||||
|
||||
public static final String VERSION = "0.3";
|
||||
public static final String ACCOUNT_MANAGER_TYPE = "com.android.exchange";
|
||||
public static final String ACCOUNT_MAILBOX = "__eas";
|
||||
|
||||
// From EAS spec
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
package com.android.exchange;
|
||||
|
||||
import com.android.email.AccountBackupRestore;
|
||||
import com.android.email.Email;
|
||||
import com.android.email.mail.MessagingException;
|
||||
import com.android.email.mail.store.TrustManagerFactory;
|
||||
import com.android.email.provider.EmailContent;
|
||||
|
@ -512,7 +513,7 @@ public class SyncManager extends Service implements Runnable {
|
|||
// Delete this from AccountManager...
|
||||
android.accounts.Account acct =
|
||||
new android.accounts.Account(account.mEmailAddress,
|
||||
Eas.ACCOUNT_MANAGER_TYPE);
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
AccountManager.get(SyncManager.this).removeAccount(acct, null, null);
|
||||
mSyncableEasMailboxSelector = null;
|
||||
mEasAccountSelector = null;
|
||||
|
@ -707,7 +708,8 @@ public class SyncManager extends Service implements Runnable {
|
|||
public class EasAccountsUpdatedListener implements OnAccountsUpdateListener {
|
||||
public void onAccountsUpdated(android.accounts.Account[] accounts) {
|
||||
reconcileAccountsWithAccountManager(INSTANCE, getAccountList(),
|
||||
AccountManager.get(INSTANCE).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE));
|
||||
AccountManager.get(INSTANCE).getAccountsByType(
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1200,7 +1202,7 @@ public class SyncManager extends Service implements Runnable {
|
|||
// Create an AccountManager style Account
|
||||
android.accounts.Account acct =
|
||||
new android.accounts.Account(easAccount.mEmailAddress,
|
||||
Eas.ACCOUNT_MANAGER_TYPE);
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
// Get the Contacts mailbox; this happens rarely so it's ok to get it all
|
||||
Mailbox contacts = Mailbox.restoreMailboxWithId(this, contactsId);
|
||||
int syncInterval = contacts.mSyncInterval;
|
||||
|
@ -1612,7 +1614,7 @@ public class SyncManager extends Service implements Runnable {
|
|||
if (account != null) {
|
||||
android.accounts.Account a =
|
||||
new android.accounts.Account(account.mEmailAddress,
|
||||
Eas.ACCOUNT_MANAGER_TYPE);
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
if (!ContentResolver.getSyncAutomatically(a,
|
||||
ContactsContract.AUTHORITY)) {
|
||||
continue;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package com.android.exchange.adapter;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.provider.EmailContent.Mailbox;
|
||||
import com.android.exchange.Eas;
|
||||
import com.android.exchange.EasSyncService;
|
||||
|
@ -86,7 +87,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
|
||||
private static final ContentProviderOperation PLACEHOLDER_OPERATION =
|
||||
ContentProviderOperation.newInsert(Uri.EMPTY).build();
|
||||
|
||||
|
||||
private static final Uri sEventsUri = asSyncAdapter(Events.CONTENT_URI);
|
||||
private static final Uri sAttendeesUri = asSyncAdapter(Attendees.CONTENT_URI);
|
||||
private static final Uri sExtendedPropertiesUri = asSyncAdapter(ExtendedProperties.CONTENT_URI);
|
||||
|
@ -103,7 +104,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
|
||||
Cursor c = mService.mContentResolver.query(Calendars.CONTENT_URI,
|
||||
new String[] {Calendars._ID}, CALENDAR_SELECTION,
|
||||
new String[] {mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE}, null);
|
||||
new String[] {mAccount.mEmailAddress, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE}, null);
|
||||
try {
|
||||
if (c.moveToFirst()) {
|
||||
mCalendarId = c.getLong(CALENDAR_SELECTION_ID);
|
||||
|
@ -131,7 +132,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
EasCalendarSyncParser p = new EasCalendarSyncParser(is, this);
|
||||
return p.parse();
|
||||
}
|
||||
|
||||
|
||||
static Uri asSyncAdapter(Uri uri) {
|
||||
return uri.buildUpon().appendQueryParameter(Calendar.CALLER_IS_SYNCADAPTER, "true").build();
|
||||
}
|
||||
|
@ -194,7 +195,8 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
public android.accounts.Account getAccountManagerAccount() {
|
||||
if (mAccountManagerAccount == null) {
|
||||
mAccountManagerAccount =
|
||||
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
new android.accounts.Account(mAccount.mEmailAddress,
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
}
|
||||
return mAccountManagerAccount;
|
||||
}
|
||||
|
@ -218,7 +220,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
// Delete the calendar associated with this account
|
||||
// TODO Make sure the Events, etc. are also deleted
|
||||
mContentResolver.delete(Calendars.CONTENT_URI, CALENDAR_SELECTION,
|
||||
new String[] {mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE});
|
||||
new String[] {mAccount.mEmailAddress, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE});
|
||||
}
|
||||
|
||||
public void addEvent(CalendarOperations ops, String serverId, boolean update)
|
||||
|
@ -226,7 +228,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
ContentValues cv = new ContentValues();
|
||||
cv.put(Events.CALENDAR_ID, mCalendarId);
|
||||
cv.put(Events._SYNC_ACCOUNT, mAccount.mEmailAddress);
|
||||
cv.put(Events._SYNC_ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Events._SYNC_ACCOUNT_TYPE, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Events._SYNC_ID, serverId);
|
||||
|
||||
int allDayEvent = 0;
|
||||
|
@ -429,7 +431,7 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
|
|||
ContentValues cv = new ContentValues();
|
||||
cv.put(Events.CALENDAR_ID, mCalendarId);
|
||||
cv.put(Events._SYNC_ACCOUNT, mAccount.mEmailAddress);
|
||||
cv.put(Events._SYNC_ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Events._SYNC_ACCOUNT_TYPE, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
|
||||
// It appears that these values have to be copied from the parent if they are to appear
|
||||
// Note that they can be overridden below
|
||||
|
|
|
@ -163,7 +163,7 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
|||
// Make sure ungrouped contacts for Exchange are defaultly visible
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put(Groups.ACCOUNT_NAME, mAccount.mEmailAddress);
|
||||
cv.put(Groups.ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Groups.ACCOUNT_TYPE, com.android.email.Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Settings.UNGROUPED_VISIBLE, true);
|
||||
client.insert(addCallerIsSyncAdapterParameter(Settings.CONTENT_URI), cv);
|
||||
return "0";
|
||||
|
@ -198,8 +198,8 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
|||
|
||||
public android.accounts.Account getAccountManagerAccount() {
|
||||
if (mAccountManagerAccount == null) {
|
||||
mAccountManagerAccount =
|
||||
new android.accounts.Account(mAccount.mEmailAddress, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
mAccountManagerAccount = new android.accounts.Account(mAccount.mEmailAddress,
|
||||
com.android.email.Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
}
|
||||
return mAccountManagerAccount;
|
||||
}
|
||||
|
@ -893,7 +893,8 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
|||
private Uri uriWithAccountAndIsSyncAdapter(Uri uri) {
|
||||
return uri.buildUpon()
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_NAME, mAccount.mEmailAddress)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE,
|
||||
com.android.email.Email.EXCHANGE_ACCOUNT_MANAGER_TYPE)
|
||||
.appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
|
||||
.build();
|
||||
}
|
||||
|
@ -1771,7 +1772,8 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
|||
ContentResolver cr = mService.mContentResolver;
|
||||
Uri uri = RawContactsEntity.CONTENT_URI.buildUpon()
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_NAME, mAccount.mEmailAddress)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE)
|
||||
.appendQueryParameter(RawContacts.ACCOUNT_TYPE,
|
||||
com.android.email.Email.EXCHANGE_ACCOUNT_MANAGER_TYPE)
|
||||
.appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
|
||||
.build();
|
||||
|
||||
|
@ -1879,7 +1881,7 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
|||
for (ContentValues cv: emailValues) {
|
||||
sendEmail(s, cv, emailCount++, displayName);
|
||||
}
|
||||
|
||||
|
||||
// Now, we'll send up groups, if any
|
||||
if (!groupIds.isEmpty()) {
|
||||
boolean groupFirst = true;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package com.android.exchange.adapter;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.provider.AttachmentProvider;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
|
@ -249,7 +250,7 @@ public class FolderSyncParser extends AbstractSyncParser {
|
|||
// TODO How will this change if the user changes his account display name?
|
||||
cv.put(Calendars.DISPLAY_NAME, mAccount.mDisplayName);
|
||||
cv.put(Calendars._SYNC_ACCOUNT, mAccount.mEmailAddress);
|
||||
cv.put(Calendars._SYNC_ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Calendars._SYNC_ACCOUNT_TYPE, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
cv.put(Calendars.SYNC_EVENTS, 1);
|
||||
cv.put(Calendars.SELECTED, 1);
|
||||
cv.put(Calendars.HIDDEN, 0);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package com.android.exchange;
|
||||
|
||||
import com.android.email.Email;
|
||||
import com.android.email.provider.EmailContent;
|
||||
import com.android.email.provider.EmailProvider;
|
||||
import com.android.email.provider.ProviderTestUtils;
|
||||
|
@ -63,7 +64,7 @@ public class SyncManagerAccountTests extends ProviderTestCase2<EmailProvider> {
|
|||
}
|
||||
|
||||
private android.accounts.Account makeAccountManagerAccount(String username) {
|
||||
return new android.accounts.Account(username, Eas.ACCOUNT_MANAGER_TYPE);
|
||||
return new android.accounts.Account(username, Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
}
|
||||
|
||||
private void createAccountManagerAccount(String username) {
|
||||
|
@ -105,7 +106,7 @@ public class SyncManagerAccountTests extends ProviderTestCase2<EmailProvider> {
|
|||
|
||||
private void deleteTemporaryAccountManagerAccounts(Context context) {
|
||||
android.accounts.Account[] accountManagerAccounts =
|
||||
AccountManager.get(context).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE);
|
||||
AccountManager.get(context).getAccountsByType(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
for (android.accounts.Account accountManagerAccount: accountManagerAccounts) {
|
||||
if (accountManagerAccount.name.startsWith(TEST_ACCOUNT_PREFIX) &&
|
||||
accountManagerAccount.name.endsWith(TEST_ACCOUNT_SUFFIX)) {
|
||||
|
@ -135,7 +136,7 @@ public class SyncManagerAccountTests extends ProviderTestCase2<EmailProvider> {
|
|||
// Check that they're set up properly
|
||||
assertEquals(3, EmailContent.count(mMockContext, Account.CONTENT_URI, null, null));
|
||||
android.accounts.Account[] accountManagerAccounts =
|
||||
AccountManager.get(context).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE);
|
||||
AccountManager.get(context).getAccountsByType(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
assertEquals(3, accountManagerAccounts.length);
|
||||
|
||||
// Delete account "2" from AccountManager
|
||||
|
@ -145,7 +146,7 @@ public class SyncManagerAccountTests extends ProviderTestCase2<EmailProvider> {
|
|||
|
||||
// Confirm it's deleted
|
||||
accountManagerAccounts =
|
||||
AccountManager.get(context).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE);
|
||||
AccountManager.get(context).getAccountsByType(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
assertEquals(2, accountManagerAccounts.length);
|
||||
|
||||
// Run the reconciler
|
||||
|
@ -169,8 +170,8 @@ public class SyncManagerAccountTests extends ProviderTestCase2<EmailProvider> {
|
|||
makeSyncManagerAccountList(), accountManagerAccounts);
|
||||
|
||||
// There should now be only one AccountManager account
|
||||
accountManagerAccounts =
|
||||
AccountManager.get(getContext()).getAccountsByType(Eas.ACCOUNT_MANAGER_TYPE);
|
||||
accountManagerAccounts = AccountManager.get(getContext()).getAccountsByType(
|
||||
Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
assertEquals(1, accountManagerAccounts.length);
|
||||
// ... and it should be account "3"
|
||||
assertEquals(getTestAccountEmailAddress("3"), accountManagerAccounts[0].name);
|
||||
|
|
Loading…
Reference in New Issue