diff --git a/src/com/android/contacts/ContactsApplication.java b/src/com/android/contacts/ContactsApplication.java
index 8cbdfbf..4911fc0 100644
--- a/src/com/android/contacts/ContactsApplication.java
+++ b/src/com/android/contacts/ContactsApplication.java
@@ -16,7 +16,7 @@
 
 package com.android.contacts;
 
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.test.InjectedServices;
 
 import android.app.Application;
@@ -54,7 +54,7 @@
         // Priming caches to placate the StrictMode police
         Context context = getApplicationContext();
         PreferenceManager.getDefaultSharedPreferences(context);
-        AccountTypes.getInstance(context);
+        AccountTypeManager.getInstance(context);
 
         StrictMode.setThreadPolicy(
                 new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
diff --git a/src/com/android/contacts/SplitAggregateView.java b/src/com/android/contacts/SplitAggregateView.java
index 254b0be..d99ba85 100644
--- a/src/com/android/contacts/SplitAggregateView.java
+++ b/src/com/android/contacts/SplitAggregateView.java
@@ -17,7 +17,7 @@
 package com.android.contacts;
 
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
@@ -73,7 +73,7 @@
 
     private final Uri mAggregateUri;
     private OnContactSelectedListener mListener;
-    private AccountTypes mAccountTypes;
+    private AccountTypeManager mAccountTypes;
 
     /**
      * Listener interface that gets the contact ID of the user-selected contact.
@@ -90,7 +90,7 @@
 
         mAggregateUri = aggregateUri;
 
-        mAccountTypes = AccountTypes.getInstance(context);
+        mAccountTypes = AccountTypeManager.getInstance(context);
 
         final List<RawContactInfo> list = loadData();
 
diff --git a/src/com/android/contacts/activities/ContactBrowserActivity.java b/src/com/android/contacts/activities/ContactBrowserActivity.java
index c202615..d155be0 100644
--- a/src/com/android/contacts/activities/ContactBrowserActivity.java
+++ b/src/com/android/contacts/activities/ContactBrowserActivity.java
@@ -40,7 +40,7 @@
 import com.android.contacts.list.ProviderStatusLoader;
 import com.android.contacts.list.ProviderStatusLoader.ProviderStatusListener;
 import com.android.contacts.list.StrequentContactListFragment;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.preference.ContactsPreferenceActivity;
 import com.android.contacts.util.AccountSelectionUtil;
 import com.android.contacts.util.AccountsListAdapter;
@@ -865,7 +865,7 @@
 
     private void createNewContact() {
         final ArrayList<Account> accounts =
-                AccountTypes.getInstance(this).getAccounts(true);
+                AccountTypeManager.getInstance(this).getAccounts(true);
         if (accounts.size() <= 1 || mAddContactImageView == null) {
             // No account to choose or no control to anchor the popup-menu to
             // ==> just go straight to the editor which will disambig if necessary
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index a76a2a0..04d0f44 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -22,7 +22,7 @@
 import com.android.contacts.editor.ContactEditorFragment.SaveMode;
 import com.android.contacts.interactions.ContactDeletionInteraction;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.DialogManager;
 
 import android.accounts.Account;
@@ -216,7 +216,8 @@
 
         @Override
         public void onCustomCreateContactActivityRequested(Account account, Bundle intentExtras) {
-            final AccountTypes accountTypes = AccountTypes.getInstance(ContactEditorActivity.this);
+            final AccountTypeManager accountTypes =
+                    AccountTypeManager.getInstance(ContactEditorActivity.this);
             final AccountType accountType = accountTypes.getAccountType(account.type);
 
             Intent intent = new Intent();
@@ -238,7 +239,8 @@
         @Override
         public void onCustomEditContactActivityRequested(Account account, Uri rawContactUri,
                 Bundle intentExtras, boolean redirect) {
-            final AccountTypes accountTypes = AccountTypes.getInstance(ContactEditorActivity.this);
+            final AccountTypeManager accountTypes =
+                    AccountTypeManager.getInstance(ContactEditorActivity.this);
             final AccountType accountType = accountTypes.getAccountType(account.type);
 
             Intent intent = new Intent();
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index e56be7b..039ce2b 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -29,7 +29,7 @@
 import com.android.contacts.model.AccountType;
 import com.android.contacts.model.AccountType.DataKind;
 import com.android.contacts.model.AccountType.EditType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.Constants;
 import com.android.contacts.util.DataStatus;
 import com.android.contacts.util.DateUtils;
@@ -361,7 +361,7 @@
 
         mWritableRawContactIds.clear();
 
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
 
         // Build up method entries
         if (mContactData == null) {
@@ -1132,7 +1132,7 @@
             }
             case Directory.EXPORT_SUPPORT_ANY_ACCOUNT: {
                 final ArrayList<Account> accounts =
-                        AccountTypes.getInstance(mContext).getAccounts(true);
+                        AccountTypeManager.getInstance(mContext).getAccounts(true);
                 if (accounts.isEmpty()) {
                     createCopy(null);
                     return;  // Don't show a dialog.
diff --git a/src/com/android/contacts/editor/AggregationSuggestionView.java b/src/com/android/contacts/editor/AggregationSuggestionView.java
index da17bca..5403731 100644
--- a/src/com/android/contacts/editor/AggregationSuggestionView.java
+++ b/src/com/android/contacts/editor/AggregationSuggestionView.java
@@ -20,7 +20,7 @@
 import com.android.contacts.editor.AggregationSuggestionEngine.RawContact;
 import com.android.contacts.editor.AggregationSuggestionEngine.Suggestion;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.google.android.collect.Lists;
 
 import android.content.Context;
@@ -115,7 +115,7 @@
             return false;
         }
 
-        AccountTypes accountTypes = AccountTypes.getInstance(getContext());
+        AccountTypeManager accountTypes = AccountTypeManager.getInstance(getContext());
         for (RawContact rawContact : mRawContacts) {
             String accountType = rawContact.accountType;
             if (accountType == null) {
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 50d2578..e104bc5 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -24,9 +24,8 @@
 import com.android.contacts.activities.JoinContactActivity;
 import com.android.contacts.editor.AggregationSuggestionEngine.Suggestion;
 import com.android.contacts.editor.Editor.EditorListener;
-import com.android.contacts.editor.ExternalRawContactEditorView.Listener;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.model.EntityDelta;
 import com.android.contacts.model.EntityDelta.ValuesDelta;
 import com.android.contacts.model.EntityDeltaList;
@@ -383,7 +382,7 @@
             Entity entity = entities.get(0);
             ContentValues entityValues = entity.getEntityValues();
             String type = entityValues.getAsString(RawContacts.ACCOUNT_TYPE);
-            AccountType accountType = AccountTypes.getInstance(mContext).getAccountType(type);
+            AccountType accountType = AccountTypeManager.getInstance(mContext).getAccountType(type);
             if (accountType.getEditContactActivityClassName() != null) {
                 if (mListener != null) {
                     String name = entityValues.getAsString(RawContacts.ACCOUNT_NAME);
@@ -434,7 +433,7 @@
             return;
         }
 
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         for (EntityDelta state : mState) {
             final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
             final AccountType type = accountTypes.getAccountType(accountType);
@@ -447,7 +446,8 @@
     }
 
     private void selectAccountAndCreateContact() {
-        final ArrayList<Account> accounts = AccountTypes.getInstance(mContext).getAccounts(true);
+        final ArrayList<Account> accounts =
+                AccountTypeManager.getInstance(mContext).getAccounts(true);
         // No Accounts available.  Create a phone-local contact.
         if (accounts.isEmpty()) {
             createContact(null);
@@ -471,7 +471,7 @@
      *     be created.
      */
     private void createContact(Account account) {
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         final AccountType accountType =
                 accountTypes.getAccountType(account != null ? account.type : null);
 
@@ -528,7 +528,7 @@
 
         final LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
                 Context.LAYOUT_INFLATER_SERVICE);
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         int size = mState.size();
         for (int i = 0; i < size; i++) {
             // TODO ensure proper ordering of entities in the list
@@ -669,7 +669,7 @@
         // If we just started creating a new contact and haven't added any data, it's too
         // early to do a join
         if (mState.size() == 1 && mState.get(0).isContactInsert()) {
-            final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+            final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
             EntityModifier.trimEmpty(mState, accountTypes);
             if (mState.buildDiff().isEmpty()) {
                 Toast.makeText(getActivity(), R.string.toast_join_with_empty_contact,
@@ -775,7 +775,7 @@
         mStatus = Status.SAVING;
 
         // Trim any empty fields, and RawContacts, before persisting
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         EntityModifier.trimEmpty(mState, accountTypes);
 
         if (mState.buildDiff().isEmpty()) {
@@ -818,7 +818,7 @@
     }
 
     private boolean revert() {
-        final AccountTypes accountType = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountType = AccountTypeManager.getInstance(mContext);
         if (mState.buildDiff().isEmpty()) {
             doRevertAction();
         } else {
@@ -934,7 +934,7 @@
      * Returns true if there is at least one writable raw contact in the current contact.
      */
     private boolean isContactWritable() {
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         int size = mState.size();
         for (int i = 0; i < size; i++) {
             ValuesDelta values = mState.get(i).getValues();
@@ -1021,7 +1021,7 @@
                 return 0;
             }
 
-            final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+            final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
             String accountType2 = one.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
             final AccountType type1 = accountTypes.getAccountType(accountType2);
             accountType2 = two.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
diff --git a/src/com/android/contacts/interactions/ContactDeletionInteraction.java b/src/com/android/contacts/interactions/ContactDeletionInteraction.java
index 654c8cf..0030845 100644
--- a/src/com/android/contacts/interactions/ContactDeletionInteraction.java
+++ b/src/com/android/contacts/interactions/ContactDeletionInteraction.java
@@ -19,7 +19,7 @@
 import com.android.contacts.ContactSaveService;
 import com.android.contacts.R;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.google.android.collect.Sets;
 
 import android.app.Activity;
@@ -143,7 +143,7 @@
         HashSet<Long>  readOnlyRawContacts = Sets.newHashSet();
         HashSet<Long>  writableRawContacts = Sets.newHashSet();
 
-        AccountTypes accountTypes = AccountTypes.getInstance(getActivity());
+        AccountTypeManager accountTypes = AccountTypeManager.getInstance(getActivity());
         cursor.moveToPosition(-1);
         while (cursor.moveToNext()) {
             final long rawContactId = cursor.getLong(COLUMN_INDEX_RAW_CONTACT_ID);
diff --git a/src/com/android/contacts/interactions/ImportExportInteraction.java b/src/com/android/contacts/interactions/ImportExportInteraction.java
index 418882e..1774946 100644
--- a/src/com/android/contacts/interactions/ImportExportInteraction.java
+++ b/src/com/android/contacts/interactions/ImportExportInteraction.java
@@ -17,7 +17,7 @@
 package com.android.contacts.interactions;
 
 import com.android.contacts.R;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.AccountSelectionUtil;
 import com.android.contacts.vcard.ExportVCardActivity;
 
@@ -199,7 +199,7 @@
         // - more than one accounts -> ask the user
         // - just one account -> use the account without asking the user
         // - no account -> use phone-local storage without asking the user
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         final List<Account> accountList = accountTypes.getAccounts(true);
         final int size = accountList.size();
         if (size > 1) {
diff --git a/src/com/android/contacts/interactions/PhoneNumberInteraction.java b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
index c130b3a..1a43c9a 100644
--- a/src/com/android/contacts/interactions/PhoneNumberInteraction.java
+++ b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
@@ -23,7 +23,7 @@
 import com.android.contacts.model.AccountType;
 import com.android.contacts.model.AccountType.DataKind;
 import com.android.contacts.model.AccountType.StringInflater;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 
 import android.app.Activity;
 import android.app.AlertDialog;
@@ -128,11 +128,11 @@
      * A list adapter that populates the list of contact's phone numbers.
      */
     private class PhoneItemAdapter extends ArrayAdapter<PhoneItem> {
-        private final AccountTypes mAccountTypes;
+        private final AccountTypeManager mAccountTypes;
 
         public PhoneItemAdapter(Context context) {
             super(context, R.layout.phone_disambig_item, android.R.id.text2);
-            mAccountTypes = AccountTypes.getInstance(context);
+            mAccountTypes = AccountTypeManager.getInstance(context);
         }
 
         @Override
diff --git a/src/com/android/contacts/list/ContactListFilterLoader.java b/src/com/android/contacts/list/ContactListFilterLoader.java
index 5aaf2df..82749ff 100644
--- a/src/com/android/contacts/list/ContactListFilterLoader.java
+++ b/src/com/android/contacts/list/ContactListFilterLoader.java
@@ -17,7 +17,7 @@
 package com.android.contacts.list;
 
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 
 import android.accounts.Account;
 import android.content.AsyncTaskLoader;
@@ -76,7 +76,7 @@
 
         ArrayList<ContactListFilter> results = new ArrayList<ContactListFilter>();
         Context context = getContext();
-        final AccountTypes accountTypes = AccountTypes.getInstance(context);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(context);
         ArrayList<Account> accounts = accountTypes.getAccounts(false);
         for (Account account : accounts) {
             AccountType accountType = accountTypes.getAccountType(account.type);
diff --git a/src/com/android/contacts/list/CustomContactListFilterActivity.java b/src/com/android/contacts/list/CustomContactListFilterActivity.java
index 03f9b89..f2fb40a 100644
--- a/src/com/android/contacts/list/CustomContactListFilterActivity.java
+++ b/src/com/android/contacts/list/CustomContactListFilterActivity.java
@@ -19,7 +19,7 @@
 import com.android.contacts.ContactsSearchManager;
 import com.android.contacts.R;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.model.EntityDelta.ValuesDelta;
 import com.android.contacts.model.GoogleAccountType;
 import com.android.contacts.preference.ContactsPreferences;
@@ -154,7 +154,7 @@
 
     /**
      * Background operation to build set of {@link AccountDisplay} for each
-     * {@link AccountTypes#getAccounts(boolean)} that provides groups.
+     * {@link AccountTypeManager#getAccounts(boolean)} that provides groups.
      */
     private static class QueryGroupsTask extends
             WeakAsyncTask<Void, Void, AccountSet, CustomContactListFilterActivity> {
@@ -166,7 +166,7 @@
         protected AccountSet doInBackground(CustomContactListFilterActivity target,
                 Void... params) {
             final Context context = target;
-            final AccountTypes accountTypes = AccountTypes.getInstance(context);
+            final AccountTypeManager accountTypes = AccountTypeManager.getInstance(context);
             final ContentResolver resolver = context.getContentResolver();
 
             // Inflate groups entry for each account
@@ -503,7 +503,7 @@
     protected static class DisplayAdapter extends BaseExpandableListAdapter {
         private Context mContext;
         private LayoutInflater mInflater;
-        private AccountTypes mAccountTypes;
+        private AccountTypeManager mAccountTypes;
         private AccountSet mAccounts;
 
         private boolean mChildWithPhones = false;
@@ -511,7 +511,7 @@
         public DisplayAdapter(Context context) {
             mContext = context;
             mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            mAccountTypes = AccountTypes.getInstance(context);
+            mAccountTypes = AccountTypeManager.getInstance(context);
         }
 
         public void setAccounts(AccountSet accounts) {
diff --git a/src/com/android/contacts/model/AccountType.java b/src/com/android/contacts/model/AccountType.java
index 365e17e..456b27b 100644
--- a/src/com/android/contacts/model/AccountType.java
+++ b/src/com/android/contacts/model/AccountType.java
@@ -143,7 +143,7 @@
     /**
      * Find the {@link DataKind} for a specific MIME-type, if it's handled by
      * this data source. If you may need a fallback {@link DataKind}, use
-     * {@link AccountTypes#getKindOrFallback(String, String, Context)}.
+     * {@link AccountTypeManager#getKindOrFallback(String, String, Context)}.
      */
     public DataKind getKindForMimetype(String mimeType) {
         return this.mMimeKinds.get(mimeType);
diff --git a/src/com/android/contacts/model/AccountTypes.java b/src/com/android/contacts/model/AccountTypeManager.java
similarity index 95%
rename from src/com/android/contacts/model/AccountTypes.java
rename to src/com/android/contacts/model/AccountTypeManager.java
index d9b692d..4355986 100644
--- a/src/com/android/contacts/model/AccountTypes.java
+++ b/src/com/android/contacts/model/AccountTypeManager.java
@@ -19,7 +19,6 @@
 import com.android.contacts.model.AccountType.DataKind;
 import com.google.android.collect.Lists;
 import com.google.android.collect.Maps;
-import com.google.android.collect.Sets;
 import com.google.i18n.phonenumbers.PhoneNumberUtil;
 
 import android.accounts.Account;
@@ -41,14 +40,12 @@
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.provider.ContactsContract;
-import android.text.TextUtils;
 import android.util.Log;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Locale;
 import java.util.concurrent.CountDownLatch;
 
@@ -56,7 +53,7 @@
  * Singleton holder for all parsed {@link AccountType} available on the
  * system, typically filled through {@link PackageManager} queries.
  */
-public class AccountTypes extends BroadcastReceiver
+public class AccountTypeManager extends BroadcastReceiver
         implements OnAccountsUpdateListener, SyncStatusObserver {
     private static final String TAG = "ContactAccountTypes";
 
@@ -78,7 +75,7 @@
     /* A latch that ensures that asynchronous initialization completes before data is used */
     private volatile CountDownLatch mInitializationLatch = new CountDownLatch(1);
 
-    private static AccountTypes sInstance = null;
+    private static AccountTypeManager sInstance = null;
 
     private static final Comparator<Account> ACCOUNT_COMPARATOR = new Comparator<Account>() {
 
@@ -93,24 +90,24 @@
     };
 
     /**
-     * Requests the singleton instance of {@link AccountTypes} with data bound from
+     * Requests the singleton instance of {@link AccountTypeManager} with data bound from
      * the available authenticators. This method can safely be called from the UI thread.
      */
-    public static synchronized AccountTypes getInstance(Context context) {
+    public static synchronized AccountTypeManager getInstance(Context context) {
         if (sInstance == null) {
-            sInstance = new AccountTypes(context.getApplicationContext());
+            sInstance = new AccountTypeManager(context.getApplicationContext());
         }
         return sInstance;
     }
 
-    public static void injectAccountTypes(AccountTypes injectedAccountTypes) {
+    public static void injectAccountTypes(AccountTypeManager injectedAccountTypes) {
         sInstance = injectedAccountTypes;
     }
 
     /**
      * Internal constructor that only performs initial parsing.
      */
-    private AccountTypes(Context context) {
+    private AccountTypeManager(Context context) {
         mContext = context;
         mAccountManager = AccountManager.get(mContext);
 
@@ -154,7 +151,7 @@
     }
 
     /** @hide exposed for unit tests */
-    public AccountTypes(AccountType... accountTypes) {
+    public AccountTypeManager(AccountType... accountTypes) {
         for (AccountType accountType : accountTypes) {
             mAccountTypes.put(accountType.accountType, accountType);
         }
diff --git a/src/com/android/contacts/model/EntityModifier.java b/src/com/android/contacts/model/EntityModifier.java
index 84364fb..c58d813 100644
--- a/src/com/android/contacts/model/EntityModifier.java
+++ b/src/com/android/contacts/model/EntityModifier.java
@@ -350,11 +350,11 @@
 
     /**
      * Processing to trim any empty {@link ValuesDelta} and {@link EntityDelta}
-     * from the given {@link EntityDeltaList}, assuming the given {@link AccountTypes}
+     * from the given {@link EntityDeltaList}, assuming the given {@link AccountTypeManager}
      * dictates the structure for various fields. This method ignores rows not
      * described by the {@link AccountType}.
      */
-    public static void trimEmpty(EntityDeltaList set, AccountTypes accountTypes) {
+    public static void trimEmpty(EntityDeltaList set, AccountTypeManager accountTypes) {
         for (EntityDelta state : set) {
             final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
             final AccountType source = accountTypes.getAccountType(accountType);
diff --git a/src/com/android/contacts/quickcontact/QuickContactWindow.java b/src/com/android/contacts/quickcontact/QuickContactWindow.java
index afeb2a9..ce7580c 100644
--- a/src/com/android/contacts/quickcontact/QuickContactWindow.java
+++ b/src/com/android/contacts/quickcontact/QuickContactWindow.java
@@ -21,7 +21,7 @@
 import com.android.contacts.ContactSaveService;
 import com.android.contacts.R;
 import com.android.contacts.model.AccountType.DataKind;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.Constants;
 import com.android.contacts.util.DataStatus;
 import com.android.contacts.util.NotifyingAsyncQueryHandler;
@@ -654,7 +654,7 @@
         mDefaultsMap.clear();
 
         final DataStatus status = new DataStatus();
-        final AccountTypes accountTypes = AccountTypes.getInstance(mContext);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
         final ImageView photoView = (ImageView)mHeader.findViewById(R.id.photo);
 
         Bitmap photoBitmap = null;
diff --git a/src/com/android/contacts/util/AccountSelectionUtil.java b/src/com/android/contacts/util/AccountSelectionUtil.java
index febdc49..46d20b8 100644
--- a/src/com/android/contacts/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/util/AccountSelectionUtil.java
@@ -33,7 +33,7 @@
 
 import com.android.contacts.R;
 import com.android.contacts.model.AccountType;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 
 import java.util.List;
 
@@ -87,7 +87,7 @@
     public static Dialog getSelectAccountDialog(Context context, int resId,
             DialogInterface.OnClickListener onClickListener,
             DialogInterface.OnCancelListener onCancelListener) {
-        final AccountTypes accountTypes = AccountTypes.getInstance(context);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(context);
         final List<Account> writableAccountList = accountTypes.getAccounts(true);
 
         Log.i(LOG_TAG, "The number of available accounts: " + writableAccountList.size());
diff --git a/src/com/android/contacts/util/AccountsListAdapter.java b/src/com/android/contacts/util/AccountsListAdapter.java
index 4832bc0..8dbfc8d 100644
--- a/src/com/android/contacts/util/AccountsListAdapter.java
+++ b/src/com/android/contacts/util/AccountsListAdapter.java
@@ -17,7 +17,7 @@
 package com.android.contacts.util;
 
 import com.android.contacts.R;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.model.AccountType;
 
 import android.accounts.Account;
@@ -37,12 +37,12 @@
 public final class AccountsListAdapter extends BaseAdapter {
     private final LayoutInflater mInflater;
     private final List<Account> mAccounts;
-    private final AccountTypes mAccountTypes;
+    private final AccountTypeManager mAccountTypes;
     private final Context mContext;
 
     public AccountsListAdapter(Context context, boolean writableOnly) {
         mContext = context;
-        mAccountTypes = AccountTypes.getInstance(context);
+        mAccountTypes = AccountTypeManager.getInstance(context);
         mAccounts = mAccountTypes.getAccounts(writableOnly);
         mInflater = LayoutInflater.from(context);
     }
diff --git a/src/com/android/contacts/vcard/ImportVCardActivity.java b/src/com/android/contacts/vcard/ImportVCardActivity.java
index 67e3797..e417d09 100644
--- a/src/com/android/contacts/vcard/ImportVCardActivity.java
+++ b/src/com/android/contacts/vcard/ImportVCardActivity.java
@@ -17,7 +17,7 @@
 package com.android.contacts.vcard;
 
 import com.android.contacts.R;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.AccountSelectionUtil;
 import com.android.vcard.VCardEntryCounter;
 import com.android.vcard.VCardInterpreterCollection;
@@ -769,7 +769,7 @@
         if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(accountType)) {
             mAccount = new Account(accountName, accountType);
         } else {
-            final AccountTypes accountTypes = AccountTypes.getInstance(this);
+            final AccountTypeManager accountTypes = AccountTypeManager.getInstance(this);
             final List<Account> accountList = accountTypes.getAccounts(true);
             if (accountList.size() == 0) {
                 mAccount = null;
diff --git a/src/com/android/contacts/vcard/SelectAccountActivity.java b/src/com/android/contacts/vcard/SelectAccountActivity.java
index 91e6902..203a205 100644
--- a/src/com/android/contacts/vcard/SelectAccountActivity.java
+++ b/src/com/android/contacts/vcard/SelectAccountActivity.java
@@ -24,7 +24,7 @@
 import android.util.Log;
 
 import com.android.contacts.R;
-import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.AccountTypeManager;
 import com.android.contacts.util.AccountSelectionUtil;
 
 import java.util.List;
@@ -56,7 +56,7 @@
         // - just one account -> use the account without asking the user
         // - no account -> use phone-local storage without asking the user
         final int resId = R.string.import_from_sdcard;
-        final AccountTypes accountTypes = AccountTypes.getInstance(this);
+        final AccountTypeManager accountTypes = AccountTypeManager.getInstance(this);
         final List<Account> accountList = accountTypes.getAccounts(true);
         if (accountList.size() == 0) {
             Log.w(LOG_TAG, "Account does not exist");
