diff options
73 files changed, 298 insertions, 315 deletions
diff --git a/src/com/android/providers/contacts/AccountWithDataSet.java b/src/com/android/providers/contacts/AccountWithDataSet.java index 3fea8a6..b7484cd 100644 --- a/src/com/android/providers/contacts/AccountWithDataSet.java +++ b/src/com/android/providers/contacts/AccountWithDataSet.java @@ -16,11 +16,11 @@ package com.android.providers.contacts; -import com.android.internal.util.Objects; - import android.accounts.Account; import android.text.TextUtils; +import com.android.internal.util.Objects; + /** * Account information that includes the data set, if any. */ diff --git a/src/com/android/providers/contacts/CallLogProvider.java b/src/com/android/providers/contacts/CallLogProvider.java index 89ae591..21a16f1 100644 --- a/src/com/android/providers/contacts/CallLogProvider.java +++ b/src/com/android/providers/contacts/CallLogProvider.java @@ -20,10 +20,6 @@ import static com.android.providers.contacts.util.DbQueryUtils.checkForSupported import static com.android.providers.contacts.util.DbQueryUtils.getEqualityClause; import static com.android.providers.contacts.util.DbQueryUtils.getInequalityClause; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.util.SelectionBuilder; -import com.google.common.annotations.VisibleForTesting; - import android.content.ContentProvider; import android.content.ContentUris; import android.content.ContentValues; @@ -38,6 +34,10 @@ import android.provider.CallLog; import android.provider.CallLog.Calls; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.util.SelectionBuilder; +import com.google.common.annotations.VisibleForTesting; + import java.util.HashMap; /** diff --git a/src/com/android/providers/contacts/ContactDirectoryManager.java b/src/com/android/providers/contacts/ContactDirectoryManager.java index 7116ed6..f243e79 100644 --- a/src/com/android/providers/contacts/ContactDirectoryManager.java +++ b/src/com/android/providers/contacts/ContactDirectoryManager.java @@ -16,13 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; -import com.android.providers.contacts.ContactsDatabaseHelper.DirectoryColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.google.android.collect.Lists; -import com.google.android.collect.Sets; -import com.google.common.annotations.VisibleForTesting; - import android.content.ContentValues; import android.content.Context; import android.content.pm.PackageInfo; @@ -41,6 +34,13 @@ import android.provider.ContactsContract.Directory; import android.text.TextUtils; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; +import com.android.providers.contacts.ContactsDatabaseHelper.DirectoryColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.google.android.collect.Lists; +import com.google.android.collect.Sets; +import com.google.common.annotations.VisibleForTesting; + import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/src/com/android/providers/contacts/ContactLocaleUtils.java b/src/com/android/providers/contacts/ContactLocaleUtils.java index 2eb2ad6..0e7b292 100644 --- a/src/com/android/providers/contacts/ContactLocaleUtils.java +++ b/src/com/android/providers/contacts/ContactLocaleUtils.java @@ -16,11 +16,11 @@ package com.android.providers.contacts; -import com.android.providers.contacts.HanziToPinyin.Token; - import android.provider.ContactsContract.FullNameStyle; import android.util.SparseArray; +import com.android.providers.contacts.HanziToPinyin.Token; + import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; diff --git a/src/com/android/providers/contacts/ContactsDatabaseHelper.java b/src/com/android/providers/contacts/ContactsDatabaseHelper.java index bc58e6f..62f49ae 100644 --- a/src/com/android/providers/contacts/ContactsDatabaseHelper.java +++ b/src/com/android/providers/contacts/ContactsDatabaseHelper.java @@ -16,11 +16,6 @@ package com.android.providers.contacts; -import com.android.common.content.SyncStateContentProviderHelper; -import com.android.providers.contacts.aggregation.util.CommonNicknameCache; -import com.android.providers.contacts.util.NeededForTesting; -import com.google.android.collect.Sets; - import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; @@ -80,6 +75,11 @@ import android.text.util.Rfc822Token; import android.text.util.Rfc822Tokenizer; import android.util.Log; +import com.android.common.content.SyncStateContentProviderHelper; +import com.android.providers.contacts.aggregation.util.CommonNicknameCache; +import com.android.providers.contacts.util.NeededForTesting; +import com.google.android.collect.Sets; + import java.util.HashMap; import java.util.Locale; import java.util.Set; diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java index d98acaa..484aa79 100644 --- a/src/com/android/providers/contacts/ContactsProvider2.java +++ b/src/com/android/providers/contacts/ContactsProvider2.java @@ -16,51 +16,6 @@ package com.android.providers.contacts; -import com.android.common.content.ProjectionMap; -import com.android.common.content.SyncStateContentProviderHelper; -import com.android.providers.contacts.ContactLookupKey.LookupKeySegment; -import com.android.providers.contacts.ContactsDatabaseHelper.AccountsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.AggregatedPresenceColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Clauses; -import com.android.providers.contacts.ContactsDatabaseHelper.ContactsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.ContactsStatusUpdatesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DataUsageStatColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; -import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Joins; -import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupType; -import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.PhotoFilesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Projections; -import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.SearchIndexColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.SettingsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.StatusUpdatesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.StreamItemPhotosColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.StreamItemsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.ContactsDatabaseHelper.ViewGroupsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Views; -import com.android.providers.contacts.SearchIndexManager.FtsQueryBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; -import com.android.providers.contacts.aggregation.ContactAggregator.AggregationSuggestionParameter; -import com.android.providers.contacts.aggregation.util.CommonNicknameCache; -import com.android.providers.contacts.aggregation.ProfileAggregator; -import com.android.providers.contacts.util.Clock; -import com.android.providers.contacts.util.DbQueryUtils; -import com.android.providers.contacts.util.NeededForTesting; -import com.android.vcard.VCardComposer; -import com.android.vcard.VCardConfig; -import com.google.android.collect.Lists; -import com.google.android.collect.Maps; -import com.google.android.collect.Sets; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; - import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.OnAccountsUpdateListener; @@ -151,6 +106,51 @@ import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; +import com.android.common.content.ProjectionMap; +import com.android.common.content.SyncStateContentProviderHelper; +import com.android.providers.contacts.ContactLookupKey.LookupKeySegment; +import com.android.providers.contacts.ContactsDatabaseHelper.AccountsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.AggregatedPresenceColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Clauses; +import com.android.providers.contacts.ContactsDatabaseHelper.ContactsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.ContactsStatusUpdatesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DataUsageStatColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; +import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Joins; +import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupType; +import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.PhotoFilesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Projections; +import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.SearchIndexColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.SettingsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.StatusUpdatesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.StreamItemPhotosColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.StreamItemsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.ContactsDatabaseHelper.ViewGroupsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Views; +import com.android.providers.contacts.SearchIndexManager.FtsQueryBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; +import com.android.providers.contacts.aggregation.ContactAggregator.AggregationSuggestionParameter; +import com.android.providers.contacts.aggregation.ProfileAggregator; +import com.android.providers.contacts.aggregation.util.CommonNicknameCache; +import com.android.providers.contacts.util.Clock; +import com.android.providers.contacts.util.DbQueryUtils; +import com.android.providers.contacts.util.NeededForTesting; +import com.android.vcard.VCardComposer; +import com.android.vcard.VCardConfig; +import com.google.android.collect.Lists; +import com.google.android.collect.Maps; +import com.google.android.collect.Sets; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; + import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/src/com/android/providers/contacts/ContactsTransaction.java b/src/com/android/providers/contacts/ContactsTransaction.java index f582106..c6c11d9 100644 --- a/src/com/android/providers/contacts/ContactsTransaction.java +++ b/src/com/android/providers/contacts/ContactsTransaction.java @@ -16,13 +16,13 @@ package com.android.providers.contacts; -import com.google.android.collect.Lists; -import com.google.android.collect.Maps; - import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteTransactionListener; import android.util.Log; +import com.google.android.collect.Lists; +import com.google.android.collect.Maps; + import java.util.List; import java.util.Map; diff --git a/src/com/android/providers/contacts/DataRowHandler.java b/src/com/android/providers/contacts/DataRowHandler.java index b98f6c7..0366532 100644 --- a/src/com/android/providers/contacts/DataRowHandler.java +++ b/src/com/android/providers/contacts/DataRowHandler.java @@ -15,12 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -33,6 +27,12 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Data; import android.text.TextUtils; +import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handles inserts and update for a specific Data type. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForCommonDataKind.java b/src/com/android/providers/contacts/DataRowHandlerForCommonDataKind.java index b717d31..0bb17c2 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForCommonDataKind.java +++ b/src/com/android/providers/contacts/DataRowHandlerForCommonDataKind.java @@ -15,8 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -24,6 +22,8 @@ import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.BaseTypes; import android.text.TextUtils; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Superclass for data row handlers that deal with types (e.g. Home, Work, Other) and * labels, which are custom types. diff --git a/src/com/android/providers/contacts/DataRowHandlerForCustomMimetype.java b/src/com/android/providers/contacts/DataRowHandlerForCustomMimetype.java index 0202fd6..502b835 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForCustomMimetype.java +++ b/src/com/android/providers/contacts/DataRowHandlerForCustomMimetype.java @@ -15,10 +15,10 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.Context; +import com.android.providers.contacts.aggregation.ContactAggregator; + public class DataRowHandlerForCustomMimetype extends DataRowHandler { public DataRowHandlerForCustomMimetype(Context context, diff --git a/src/com/android/providers/contacts/DataRowHandlerForEmail.java b/src/com/android/providers/contacts/DataRowHandlerForEmail.java index f1fa941..38cb2e1 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForEmail.java +++ b/src/com/android/providers/contacts/DataRowHandlerForEmail.java @@ -15,15 +15,15 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.Email; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for email address data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForGroupMembership.java b/src/com/android/providers/contacts/DataRowHandlerForGroupMembership.java index 3a4b167..0d2427a 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForGroupMembership.java +++ b/src/com/android/providers/contacts/DataRowHandlerForGroupMembership.java @@ -15,15 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.Clauses; -import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Projections; -import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.ContactsProvider2.GroupIdCacheEntry; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -33,6 +24,15 @@ import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.Groups; import android.provider.ContactsContract.RawContacts; +import com.android.providers.contacts.ContactsDatabaseHelper.Clauses; +import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Projections; +import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.ContactsProvider2.GroupIdCacheEntry; +import com.android.providers.contacts.aggregation.ContactAggregator; + import java.util.ArrayList; import java.util.HashMap; diff --git a/src/com/android/providers/contacts/DataRowHandlerForIdentity.java b/src/com/android/providers/contacts/DataRowHandlerForIdentity.java index 440e430..48ce5e4 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForIdentity.java +++ b/src/com/android/providers/contacts/DataRowHandlerForIdentity.java @@ -15,14 +15,14 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.Identity; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for Identity data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForIm.java b/src/com/android/providers/contacts/DataRowHandlerForIm.java index 009bb89..faf10ad 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForIm.java +++ b/src/com/android/providers/contacts/DataRowHandlerForIm.java @@ -15,13 +15,13 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.provider.ContactsContract.CommonDataKinds.Im; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for IM address data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForNickname.java b/src/com/android/providers/contacts/DataRowHandlerForNickname.java index 0fec6ee..95f24f5 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForNickname.java +++ b/src/com/android/providers/contacts/DataRowHandlerForNickname.java @@ -15,9 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -25,6 +22,9 @@ import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.Nickname; import android.text.TextUtils; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for nickname data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForNote.java b/src/com/android/providers/contacts/DataRowHandlerForNote.java index 317af1a..ea73637 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForNote.java +++ b/src/com/android/providers/contacts/DataRowHandlerForNote.java @@ -15,13 +15,13 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.provider.ContactsContract.CommonDataKinds.Note; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for note data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForOrganization.java b/src/com/android/providers/contacts/DataRowHandlerForOrganization.java index 7384ccb..44146e8 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForOrganization.java +++ b/src/com/android/providers/contacts/DataRowHandlerForOrganization.java @@ -15,10 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -27,6 +23,10 @@ import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.Organization; import android.provider.ContactsContract.Data; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for organization data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForPhoneNumber.java b/src/com/android/providers/contacts/DataRowHandlerForPhoneNumber.java index 99313e9..da7d66c 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForPhoneNumber.java +++ b/src/com/android/providers/contacts/DataRowHandlerForPhoneNumber.java @@ -15,11 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -28,6 +23,11 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; +import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for phone number data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForPhoto.java b/src/com/android/providers/contacts/DataRowHandlerForPhoto.java index 7560ed4..bfaa501 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForPhoto.java +++ b/src/com/android/providers/contacts/DataRowHandlerForPhoto.java @@ -15,8 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -24,6 +22,8 @@ import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.Photo; import android.util.Log; +import com.android.providers.contacts.aggregation.ContactAggregator; + import java.io.IOException; /** diff --git a/src/com/android/providers/contacts/DataRowHandlerForStructuredName.java b/src/com/android/providers/contacts/DataRowHandlerForStructuredName.java index c84d2e8..01ee1ba 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForStructuredName.java +++ b/src/com/android/providers/contacts/DataRowHandlerForStructuredName.java @@ -15,9 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -26,6 +23,9 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.FullNameStyle; import android.text.TextUtils; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for email address data rows. */ diff --git a/src/com/android/providers/contacts/DataRowHandlerForStructuredPostal.java b/src/com/android/providers/contacts/DataRowHandlerForStructuredPostal.java index 6898a43..26483ed 100644 --- a/src/com/android/providers/contacts/DataRowHandlerForStructuredPostal.java +++ b/src/com/android/providers/contacts/DataRowHandlerForStructuredPostal.java @@ -15,9 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import com.android.providers.contacts.aggregation.ContactAggregator; - import android.content.ContentValues; import android.content.Context; import android.database.Cursor; @@ -25,6 +22,9 @@ import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.text.TextUtils; +import com.android.providers.contacts.SearchIndexManager.IndexBuilder; +import com.android.providers.contacts.aggregation.ContactAggregator; + /** * Handler for postal address data rows. */ diff --git a/src/com/android/providers/contacts/DbModifierWithNotification.java b/src/com/android/providers/contacts/DbModifierWithNotification.java index c13f4a8..fda8321 100644 --- a/src/com/android/providers/contacts/DbModifierWithNotification.java +++ b/src/com/android/providers/contacts/DbModifierWithNotification.java @@ -20,11 +20,6 @@ package com.android.providers.contacts; import static android.Manifest.permission.ADD_VOICEMAIL; import static com.android.providers.contacts.Manifest.permission.READ_WRITE_ALL_VOICEMAIL; -import com.android.common.io.MoreCloseables; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.util.DbQueryUtils; -import com.google.android.collect.Lists; - import android.content.ComponentName; import android.content.ContentUris; import android.content.ContentValues; @@ -43,6 +38,11 @@ import android.provider.VoicemailContract.Status; import android.provider.VoicemailContract.Voicemails; import android.util.Log; +import com.android.common.io.MoreCloseables; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.util.DbQueryUtils; +import com.google.android.collect.Lists; + import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/src/com/android/providers/contacts/DefaultCallLogInsertionHelper.java b/src/com/android/providers/contacts/DefaultCallLogInsertionHelper.java index 6777e43..fcda8f1 100644 --- a/src/com/android/providers/contacts/DefaultCallLogInsertionHelper.java +++ b/src/com/android/providers/contacts/DefaultCallLogInsertionHelper.java @@ -16,16 +16,15 @@ package com.android.providers.contacts; +import android.content.ContentValues; +import android.content.Context; +import android.provider.CallLog.Calls; + import com.android.i18n.phonenumbers.NumberParseException; import com.android.i18n.phonenumbers.PhoneNumberUtil; import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber; import com.android.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder; -import android.content.ContentValues; -import android.content.Context; -import android.provider.CallLog.Calls; -import android.util.Log; - import java.util.Locale; /** diff --git a/src/com/android/providers/contacts/FastScrollingIndexCache.java b/src/com/android/providers/contacts/FastScrollingIndexCache.java index c1c5602..f07a855 100644 --- a/src/com/android/providers/contacts/FastScrollingIndexCache.java +++ b/src/com/android/providers/contacts/FastScrollingIndexCache.java @@ -16,11 +16,9 @@ package com.android.providers.contacts; -import com.google.android.collect.Maps; -import com.google.common.annotations.VisibleForTesting; - import android.content.Context; import android.content.SharedPreferences; +import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; @@ -28,6 +26,9 @@ import android.provider.ContactsContract.ContactCounts; import android.text.TextUtils; import android.util.Log; +import com.google.android.collect.Maps; +import com.google.common.annotations.VisibleForTesting; + import java.util.Map; import java.util.regex.Pattern; diff --git a/src/com/android/providers/contacts/LegacyApiSupport.java b/src/com/android/providers/contacts/LegacyApiSupport.java index 78cbc9d..9859d11 100644 --- a/src/com/android/providers/contacts/LegacyApiSupport.java +++ b/src/com/android/providers/contacts/LegacyApiSupport.java @@ -15,19 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.AccountsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.ExtensionsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupType; -import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.StatusUpdatesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; - import android.accounts.Account; import android.app.SearchManager; import android.content.ContentUris; @@ -65,6 +52,19 @@ import android.provider.ContactsContract.StatusUpdates; import android.text.TextUtils; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.AccountsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.ExtensionsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.GroupsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupType; +import com.android.providers.contacts.ContactsDatabaseHelper.PhoneLookupColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.StatusUpdatesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; + import java.util.HashMap; import java.util.Locale; diff --git a/src/com/android/providers/contacts/NameLookupBuilder.java b/src/com/android/providers/contacts/NameLookupBuilder.java index 5ebbcd1..8375b88 100644 --- a/src/com/android/providers/contacts/NameLookupBuilder.java +++ b/src/com/android/providers/contacts/NameLookupBuilder.java @@ -16,11 +16,11 @@ package com.android.providers.contacts; +import android.provider.ContactsContract.FullNameStyle; + import com.android.providers.contacts.ContactsDatabaseHelper.NameLookupType; import com.android.providers.contacts.SearchIndexManager.IndexBuilder; -import android.provider.ContactsContract.FullNameStyle; - import java.util.Arrays; import java.util.Comparator; import java.util.Iterator; diff --git a/src/com/android/providers/contacts/NameNormalizer.java b/src/com/android/providers/contacts/NameNormalizer.java index d91bd7c..c2b945e 100644 --- a/src/com/android/providers/contacts/NameNormalizer.java +++ b/src/com/android/providers/contacts/NameNormalizer.java @@ -17,10 +17,10 @@ package com.android.providers.contacts; import com.android.providers.contacts.util.Hex; -import java.util.Locale; -import java.text.Collator; import java.text.CollationKey; +import java.text.Collator; import java.text.RuleBasedCollator; +import java.util.Locale; /** * Converts a name to a normalized form by removing all non-letter characters and normalizing diff --git a/src/com/android/providers/contacts/NameSplitter.java b/src/com/android/providers/contacts/NameSplitter.java index fd5b096..43743ee 100644 --- a/src/com/android/providers/contacts/NameSplitter.java +++ b/src/com/android/providers/contacts/NameSplitter.java @@ -15,14 +15,14 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.util.NeededForTesting; - import android.content.ContentValues; +import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.FullNameStyle; import android.provider.ContactsContract.PhoneticNameStyle; -import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.text.TextUtils; +import com.android.providers.contacts.util.NeededForTesting; + import java.lang.Character.UnicodeBlock; import java.util.HashSet; import java.util.Locale; diff --git a/src/com/android/providers/contacts/PhotoPriorityResolver.java b/src/com/android/providers/contacts/PhotoPriorityResolver.java index c0dc4d9..150811c 100644 --- a/src/com/android/providers/contacts/PhotoPriorityResolver.java +++ b/src/com/android/providers/contacts/PhotoPriorityResolver.java @@ -16,22 +16,22 @@ package com.android.providers.contacts; -import com.android.internal.util.XmlUtils; -import com.google.android.collect.Maps; - -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - import android.accounts.AccountManager; import android.accounts.AuthenticatorDescription; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; -import android.content.pm.ServiceInfo; import android.content.pm.PackageManager.NameNotFoundException; +import android.content.pm.ServiceInfo; import android.content.res.XmlResourceParser; import android.util.Log; +import com.android.internal.util.XmlUtils; +import com.google.android.collect.Maps; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + import java.io.IOException; import java.util.HashMap; diff --git a/src/com/android/providers/contacts/PhotoStore.java b/src/com/android/providers/contacts/PhotoStore.java index e0b5fb4..e7be48c 100644 --- a/src/com/android/providers/contacts/PhotoStore.java +++ b/src/com/android/providers/contacts/PhotoStore.java @@ -15,17 +15,16 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.PhotoFilesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; - -import com.google.common.annotations.VisibleForTesting; - import android.content.ContentValues; import android.database.sqlite.SQLiteDatabase; import android.graphics.Bitmap; import android.provider.ContactsContract.PhotoFiles; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.PhotoFilesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.google.common.annotations.VisibleForTesting; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/com/android/providers/contacts/ProfileAwareUriMatcher.java b/src/com/android/providers/contacts/ProfileAwareUriMatcher.java index de5cce1..051c60e 100644 --- a/src/com/android/providers/contacts/ProfileAwareUriMatcher.java +++ b/src/com/android/providers/contacts/ProfileAwareUriMatcher.java @@ -16,13 +16,13 @@ package com.android.providers.contacts; -import com.google.android.collect.Lists; -import com.google.android.collect.Maps; - import android.content.UriMatcher; import android.net.Uri; import android.provider.ContactsContract; +import com.google.android.collect.Lists; +import com.google.android.collect.Maps; + import java.util.List; import java.util.Map; import java.util.regex.Pattern; diff --git a/src/com/android/providers/contacts/ProfileDatabaseHelper.java b/src/com/android/providers/contacts/ProfileDatabaseHelper.java index 9b707a3..a23e521 100644 --- a/src/com/android/providers/contacts/ProfileDatabaseHelper.java +++ b/src/com/android/providers/contacts/ProfileDatabaseHelper.java @@ -16,13 +16,13 @@ package com.android.providers.contacts; -import com.android.providers.contacts.util.NeededForTesting; - import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract.Profile; +import com.android.providers.contacts.util.NeededForTesting; + /** * A separate version of the contacts database helper for storing the user's profile data. */ diff --git a/src/com/android/providers/contacts/SearchIndexManager.java b/src/com/android/providers/contacts/SearchIndexManager.java index bd4e1cc..361b5d8 100644 --- a/src/com/android/providers/contacts/SearchIndexManager.java +++ b/src/com/android/providers/contacts/SearchIndexManager.java @@ -15,14 +15,6 @@ */ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.SearchIndexColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.google.android.collect.Lists; -import com.google.common.annotations.VisibleForTesting; - import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; @@ -37,6 +29,14 @@ import android.provider.ContactsContract.RawContacts; import android.text.TextUtils; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.DataColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.MimetypesColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.RawContactsColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.SearchIndexColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.google.android.collect.Lists; +import com.google.common.annotations.VisibleForTesting; + import java.util.ArrayList; import java.util.HashSet; import java.util.List; diff --git a/src/com/android/providers/contacts/VoicemailCleanupService.java b/src/com/android/providers/contacts/VoicemailCleanupService.java index 39f5be5..4ad1406 100644 --- a/src/com/android/providers/contacts/VoicemailCleanupService.java +++ b/src/com/android/providers/contacts/VoicemailCleanupService.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.google.common.annotations.VisibleForTesting; - import android.app.IntentService; import android.content.ContentResolver; import android.content.Intent; @@ -25,6 +23,8 @@ import android.provider.VoicemailContract.Status; import android.provider.VoicemailContract.Voicemails; import android.util.Log; +import com.google.common.annotations.VisibleForTesting; + /** * A service that cleans up voicemail related data for packages that are uninstalled. */ diff --git a/src/com/android/providers/contacts/VoicemailContentProvider.java b/src/com/android/providers/contacts/VoicemailContentProvider.java index 79d8f92..b2f6b1e 100644 --- a/src/com/android/providers/contacts/VoicemailContentProvider.java +++ b/src/com/android/providers/contacts/VoicemailContentProvider.java @@ -19,11 +19,6 @@ import static android.provider.VoicemailContract.SOURCE_PACKAGE_FIELD; import static com.android.providers.contacts.util.DbQueryUtils.concatenateClauses; import static com.android.providers.contacts.util.DbQueryUtils.getEqualityClause; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.util.SelectionBuilder; -import com.android.providers.contacts.util.TypedUriMatcherImpl; -import com.google.common.annotations.VisibleForTesting; - import android.content.ContentProvider; import android.content.ContentValues; import android.content.Context; @@ -38,6 +33,11 @@ import android.provider.VoicemailContract; import android.provider.VoicemailContract.Voicemails; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.util.SelectionBuilder; +import com.android.providers.contacts.util.TypedUriMatcherImpl; +import com.google.common.annotations.VisibleForTesting; + import java.io.FileNotFoundException; import java.util.List; diff --git a/src/com/android/providers/contacts/VoicemailContentTable.java b/src/com/android/providers/contacts/VoicemailContentTable.java index 3b72653..3f00b26 100644 --- a/src/com/android/providers/contacts/VoicemailContentTable.java +++ b/src/com/android/providers/contacts/VoicemailContentTable.java @@ -19,10 +19,6 @@ import static com.android.providers.contacts.util.DbQueryUtils.checkForSupported import static com.android.providers.contacts.util.DbQueryUtils.concatenateClauses; import static com.android.providers.contacts.util.DbQueryUtils.getEqualityClause; -import com.android.common.content.ProjectionMap; -import com.android.providers.contacts.VoicemailContentProvider.UriData; -import com.android.providers.contacts.util.CloseUtils; - import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; @@ -38,6 +34,10 @@ import android.provider.OpenableColumns; import android.provider.VoicemailContract.Voicemails; import android.util.Log; +import com.android.common.content.ProjectionMap; +import com.android.providers.contacts.VoicemailContentProvider.UriData; +import com.android.providers.contacts.util.CloseUtils; + import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; diff --git a/src/com/android/providers/contacts/VoicemailStatusTable.java b/src/com/android/providers/contacts/VoicemailStatusTable.java index a0a61ba..2c1861b 100644 --- a/src/com/android/providers/contacts/VoicemailStatusTable.java +++ b/src/com/android/providers/contacts/VoicemailStatusTable.java @@ -18,9 +18,6 @@ package com.android.providers.contacts; import static com.android.providers.contacts.util.DbQueryUtils.concatenateClauses; -import com.android.common.content.ProjectionMap; -import com.android.providers.contacts.VoicemailContentProvider.UriData; - import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; @@ -32,6 +29,9 @@ import android.net.Uri; import android.os.ParcelFileDescriptor; import android.provider.VoicemailContract.Status; +import com.android.common.content.ProjectionMap; +import com.android.providers.contacts.VoicemailContentProvider.UriData; + /** * Implementation of {@link VoicemailTable.Delegate} for the voicemail status table. */ diff --git a/src/com/android/providers/contacts/VoicemailTable.java b/src/com/android/providers/contacts/VoicemailTable.java index db35c98..9e6c431 100644 --- a/src/com/android/providers/contacts/VoicemailTable.java +++ b/src/com/android/providers/contacts/VoicemailTable.java @@ -16,13 +16,13 @@ package com.android.providers.contacts; -import com.android.providers.contacts.VoicemailContentProvider.UriData; - import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.os.ParcelFileDescriptor; +import com.android.providers.contacts.VoicemailContentProvider.UriData; + import java.io.FileNotFoundException; /** diff --git a/src/com/android/providers/contacts/aggregation/ContactAggregator.java b/src/com/android/providers/contacts/aggregation/ContactAggregator.java index d3931e6..baae2e5 100644 --- a/src/com/android/providers/contacts/aggregation/ContactAggregator.java +++ b/src/com/android/providers/contacts/aggregation/ContactAggregator.java @@ -16,6 +16,29 @@ package com.android.providers.contacts.aggregation; +import android.database.Cursor; +import android.database.DatabaseUtils; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteQueryBuilder; +import android.database.sqlite.SQLiteStatement; +import android.net.Uri; +import android.provider.ContactsContract.AggregationExceptions; +import android.provider.ContactsContract.CommonDataKinds.Email; +import android.provider.ContactsContract.CommonDataKinds.Identity; +import android.provider.ContactsContract.CommonDataKinds.Phone; +import android.provider.ContactsContract.CommonDataKinds.Photo; +import android.provider.ContactsContract.Contacts; +import android.provider.ContactsContract.Contacts.AggregationSuggestions; +import android.provider.ContactsContract.Data; +import android.provider.ContactsContract.DisplayNameSources; +import android.provider.ContactsContract.FullNameStyle; +import android.provider.ContactsContract.PhotoFiles; +import android.provider.ContactsContract.RawContacts; +import android.provider.ContactsContract.StatusUpdates; +import android.text.TextUtils; +import android.util.EventLog; +import android.util.Log; + import com.android.providers.contacts.ContactLookupKey; import com.android.providers.contacts.ContactsDatabaseHelper; import com.android.providers.contacts.ContactsDatabaseHelper.AccountsColumns; @@ -42,29 +65,6 @@ import com.android.providers.contacts.aggregation.util.ContactMatcher; import com.android.providers.contacts.aggregation.util.ContactMatcher.MatchScore; import com.google.android.collect.Maps; -import android.database.Cursor; -import android.database.DatabaseUtils; -import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteQueryBuilder; -import android.database.sqlite.SQLiteStatement; -import android.net.Uri; -import android.provider.ContactsContract.AggregationExceptions; -import android.provider.ContactsContract.CommonDataKinds.Email; -import android.provider.ContactsContract.CommonDataKinds.Identity; -import android.provider.ContactsContract.CommonDataKinds.Phone; -import android.provider.ContactsContract.CommonDataKinds.Photo; -import android.provider.ContactsContract.Contacts; -import android.provider.ContactsContract.Contacts.AggregationSuggestions; -import android.provider.ContactsContract.Data; -import android.provider.ContactsContract.DisplayNameSources; -import android.provider.ContactsContract.FullNameStyle; -import android.provider.ContactsContract.PhotoFiles; -import android.provider.ContactsContract.RawContacts; -import android.provider.ContactsContract.StatusUpdates; -import android.text.TextUtils; -import android.util.EventLog; -import android.util.Log; - import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; diff --git a/src/com/android/providers/contacts/aggregation/ProfileAggregator.java b/src/com/android/providers/contacts/aggregation/ProfileAggregator.java index fedf5fe..276a05f 100644 --- a/src/com/android/providers/contacts/aggregation/ProfileAggregator.java +++ b/src/com/android/providers/contacts/aggregation/ProfileAggregator.java @@ -23,11 +23,11 @@ import android.provider.ContactsContract.Contacts; import com.android.providers.contacts.ContactLookupKey; import com.android.providers.contacts.ContactsDatabaseHelper; import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.aggregation.util.CommonNicknameCache; import com.android.providers.contacts.ContactsProvider2; import com.android.providers.contacts.NameSplitter; import com.android.providers.contacts.PhotoPriorityResolver; import com.android.providers.contacts.TransactionContext; +import com.android.providers.contacts.aggregation.util.CommonNicknameCache; /** * A version of the ContactAggregator for use against the profile database. diff --git a/src/com/android/providers/contacts/aggregation/util/CommonNicknameCache.java b/src/com/android/providers/contacts/aggregation/util/CommonNicknameCache.java index d6b799f..9643d81 100644 --- a/src/com/android/providers/contacts/aggregation/util/CommonNicknameCache.java +++ b/src/com/android/providers/contacts/aggregation/util/CommonNicknameCache.java @@ -16,13 +16,13 @@ package com.android.providers.contacts.aggregation.util; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; + import com.android.providers.contacts.ContactsDatabaseHelper.NicknameLookupColumns; import com.android.providers.contacts.ContactsDatabaseHelper.Tables; import com.google.android.collect.Maps; -import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; - import java.lang.ref.SoftReference; import java.util.BitSet; import java.util.HashMap; diff --git a/tests/src/com/android/providers/contacts/BaseContactsProvider2Test.java b/tests/src/com/android/providers/contacts/BaseContactsProvider2Test.java index 1154186..3759196 100644 --- a/tests/src/com/android/providers/contacts/BaseContactsProvider2Test.java +++ b/tests/src/com/android/providers/contacts/BaseContactsProvider2Test.java @@ -18,11 +18,6 @@ package com.android.providers.contacts; import static com.android.providers.contacts.ContactsActor.PACKAGE_GREY; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.util.Hex; -import com.android.providers.contacts.util.MockClock; -import com.google.android.collect.Sets; - import android.accounts.Account; import android.content.ContentProvider; import android.content.ContentResolver; @@ -62,6 +57,11 @@ import android.test.MoreAsserts; import android.test.mock.MockContentResolver; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.util.Hex; +import com.android.providers.contacts.util.MockClock; +import com.google.android.collect.Sets; + import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; diff --git a/tests/src/com/android/providers/contacts/CallLogProviderTest.java b/tests/src/com/android/providers/contacts/CallLogProviderTest.java index 02aebb7..302df4d 100644 --- a/tests/src/com/android/providers/contacts/CallLogProviderTest.java +++ b/tests/src/com/android/providers/contacts/CallLogProviderTest.java @@ -16,9 +16,6 @@ package com.android.providers.contacts; -import com.android.internal.telephony.CallerInfo; -import com.android.internal.telephony.Connection; - import android.content.ContentProvider; import android.content.ContentUris; import android.content.ContentValues; @@ -35,6 +32,9 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.VoicemailContract.Voicemails; import android.test.suitebuilder.annotation.MediumTest; +import com.android.internal.telephony.CallerInfo; +import com.android.internal.telephony.Connection; + import java.util.Arrays; import java.util.List; diff --git a/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java b/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java index 0ce9bca..4c0d2df 100644 --- a/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java +++ b/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java @@ -16,14 +16,14 @@ package com.android.providers.contacts; -import com.android.internal.telephony.CallerInfo; - import android.content.ContentUris; import android.content.ContentValues; import android.net.Uri; import android.provider.ContactsContract.RawContacts; import android.test.suitebuilder.annotation.MediumTest; +import com.android.internal.telephony.CallerInfo; + /** * Integration test for {@link CallerInfo} and {@link ContactsProvider2}. * diff --git a/tests/src/com/android/providers/contacts/ContactDirectoryManagerTest.java b/tests/src/com/android/providers/contacts/ContactDirectoryManagerTest.java index f1ff776..96cbb9b 100644 --- a/tests/src/com/android/providers/contacts/ContactDirectoryManagerTest.java +++ b/tests/src/com/android/providers/contacts/ContactDirectoryManagerTest.java @@ -16,9 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; -import com.google.android.collect.Lists; - import android.accounts.Account; import android.content.ContentValues; import android.content.Context; @@ -39,6 +36,9 @@ import android.test.mock.MockContentProvider; import android.test.suitebuilder.annotation.MediumTest; import android.util.Log; +import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; +import com.google.android.collect.Lists; + /** * Unit tests for {@link ContactDirectoryManager}. Run the test like this: * diff --git a/tests/src/com/android/providers/contacts/ContactLookupKeyTest.java b/tests/src/com/android/providers/contacts/ContactLookupKeyTest.java index 739b2cb..08f3a07 100644 --- a/tests/src/com/android/providers/contacts/ContactLookupKeyTest.java +++ b/tests/src/com/android/providers/contacts/ContactLookupKeyTest.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.ContactLookupKey.LookupKeySegment; - import android.content.ContentUris; import android.net.Uri; import android.provider.ContactsContract.AggregationExceptions; @@ -25,6 +23,8 @@ import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.RawContacts; import android.test.suitebuilder.annotation.MediumTest; +import com.android.providers.contacts.ContactLookupKey.LookupKeySegment; + import java.util.ArrayList; /** diff --git a/tests/src/com/android/providers/contacts/ContactsActor.java b/tests/src/com/android/providers/contacts/ContactsActor.java index 038eb97..e75c52e 100644 --- a/tests/src/com/android/providers/contacts/ContactsActor.java +++ b/tests/src/com/android/providers/contacts/ContactsActor.java @@ -16,9 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.util.MockSharedPreferences; -import com.google.android.collect.Sets; - import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountManagerCallback; @@ -59,6 +56,9 @@ import android.test.RenamingDelegatingContext; import android.test.mock.MockContentResolver; import android.test.mock.MockContext; +import com.android.providers.contacts.util.MockSharedPreferences; +import com.google.android.collect.Sets; + import java.io.File; import java.io.IOException; import java.util.Arrays; diff --git a/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java b/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java index a9d8a36..faddeea 100644 --- a/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java +++ b/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java @@ -16,11 +16,11 @@ package com.android.providers.contacts; +import android.test.suitebuilder.annotation.SmallTest; + import com.android.providers.contacts.ContactsDatabaseHelper.Tables; import com.google.android.collect.Sets; -import android.test.suitebuilder.annotation.SmallTest; - import java.util.Set; @SmallTest diff --git a/tests/src/com/android/providers/contacts/ContactsMockPackageManager.java b/tests/src/com/android/providers/contacts/ContactsMockPackageManager.java index 69cd9fa..694f0f3 100644 --- a/tests/src/com/android/providers/contacts/ContactsMockPackageManager.java +++ b/tests/src/com/android/providers/contacts/ContactsMockPackageManager.java @@ -15,8 +15,6 @@ */ package com.android.providers.contacts; -import com.google.android.collect.Lists; - import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; @@ -26,6 +24,8 @@ import android.content.res.Resources; import android.os.Binder; import android.test.mock.MockPackageManager; +import com.google.android.collect.Lists; + import java.util.HashMap; import java.util.List; diff --git a/tests/src/com/android/providers/contacts/ContactsMockResources.java b/tests/src/com/android/providers/contacts/ContactsMockResources.java index 248d6da..6d98665 100644 --- a/tests/src/com/android/providers/contacts/ContactsMockResources.java +++ b/tests/src/com/android/providers/contacts/ContactsMockResources.java @@ -16,10 +16,10 @@ package com.android.providers.contacts; -import com.google.android.collect.Maps; - import android.test.mock.MockResources; +import com.google.android.collect.Maps; + import java.util.Map; final class ContactsMockResources extends MockResources { diff --git a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java index b18c524..80e194d 100644 --- a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java +++ b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java @@ -18,16 +18,6 @@ package com.android.providers.contacts; import static com.android.providers.contacts.TestUtils.cv; -import com.android.internal.util.ArrayUtils; -import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DataUsageStatColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; -import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.tests.R; -import com.google.android.collect.Lists; -import com.google.android.collect.Sets; - import android.accounts.Account; import android.content.ContentProviderOperation; import android.content.ContentProviderResult; @@ -75,7 +65,16 @@ import android.provider.OpenableColumns; import android.test.MoreAsserts; import android.test.suitebuilder.annotation.LargeTest; import android.text.TextUtils; -import android.util.Log; + +import com.android.internal.util.ArrayUtils; +import com.android.providers.contacts.ContactsDatabaseHelper.AggregationExceptionColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DataUsageStatColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.DbProperties; +import com.android.providers.contacts.ContactsDatabaseHelper.PresenceColumns; +import com.android.providers.contacts.ContactsDatabaseHelper.Tables; +import com.android.providers.contacts.tests.R; +import com.google.android.collect.Lists; +import com.google.android.collect.Sets; import java.io.FileInputStream; import java.io.IOException; diff --git a/tests/src/com/android/providers/contacts/DirectoryTest.java b/tests/src/com/android/providers/contacts/DirectoryTest.java index e9592c1..c62824b 100644 --- a/tests/src/com/android/providers/contacts/DirectoryTest.java +++ b/tests/src/com/android/providers/contacts/DirectoryTest.java @@ -26,7 +26,7 @@ import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.Directory; -import android.test.suitebuilder.annotation.MediumTest;; +import android.test.suitebuilder.annotation.MediumTest; /** diff --git a/tests/src/com/android/providers/contacts/EvenMoreAsserts.java b/tests/src/com/android/providers/contacts/EvenMoreAsserts.java index c73128a..1fc15f2 100644 --- a/tests/src/com/android/providers/contacts/EvenMoreAsserts.java +++ b/tests/src/com/android/providers/contacts/EvenMoreAsserts.java @@ -16,19 +16,19 @@ package com.android.providers.contacts; -import com.google.android.collect.Sets; - import android.content.Context; import android.graphics.BitmapFactory; +import com.google.android.collect.Sets; + +import junit.framework.Assert; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Set; -import junit.framework.Assert; - /** * Contains additional assertion methods not found in Junit or MoreAsserts. */ diff --git a/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java b/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java index 7ca2a87..281834f 100644 --- a/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java +++ b/tests/src/com/android/providers/contacts/FastScrollingIndexCacheTest.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.util.MockSharedPreferences; - import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract.ContactCounts; @@ -27,6 +25,8 @@ import android.test.AndroidTestCase; import android.test.MoreAsserts; import android.test.suitebuilder.annotation.SmallTest; +import com.android.providers.contacts.util.MockSharedPreferences; + @SmallTest public class FastScrollingIndexCacheTest extends AndroidTestCase { private MockSharedPreferences mPrefs; diff --git a/tests/src/com/android/providers/contacts/GroupsTest.java b/tests/src/com/android/providers/contacts/GroupsTest.java index 3d85064..15cfc71 100644 --- a/tests/src/com/android/providers/contacts/GroupsTest.java +++ b/tests/src/com/android/providers/contacts/GroupsTest.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.google.android.collect.Lists; - import android.accounts.Account; import android.content.ContentProviderOperation; import android.content.ContentUris; @@ -32,9 +30,10 @@ import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Groups; import android.provider.ContactsContract.Settings; -import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; +import com.google.android.collect.Lists; + import java.util.ArrayList; /** diff --git a/tests/src/com/android/providers/contacts/HanziToPinyinTest.java b/tests/src/com/android/providers/contacts/HanziToPinyinTest.java index 7ffb855..d1433ce 100644 --- a/tests/src/com/android/providers/contacts/HanziToPinyinTest.java +++ b/tests/src/com/android/providers/contacts/HanziToPinyinTest.java @@ -16,17 +16,17 @@ package com.android.providers.contacts; +import android.test.suitebuilder.annotation.SmallTest; + import com.android.providers.contacts.HanziToPinyin.Token; -import android.test.suitebuilder.annotation.SmallTest; +import junit.framework.TestCase; import java.text.Collator; import java.util.ArrayList; import java.util.Arrays; import java.util.Locale; -import junit.framework.TestCase; - @SmallTest public class HanziToPinyinTest extends TestCase { private final static String ONE_HANZI = "\u675C"; diff --git a/tests/src/com/android/providers/contacts/LegacyContactsProviderTest.java b/tests/src/com/android/providers/contacts/LegacyContactsProviderTest.java index e515af2..c752e4e 100644 --- a/tests/src/com/android/providers/contacts/LegacyContactsProviderTest.java +++ b/tests/src/com/android/providers/contacts/LegacyContactsProviderTest.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.android.providers.contacts.tests.*; - import android.app.SearchManager; import android.content.ContentProvider; import android.content.ContentUris; diff --git a/tests/src/com/android/providers/contacts/NameLookupBuilderTest.java b/tests/src/com/android/providers/contacts/NameLookupBuilderTest.java index a5cff7a..a54193e 100644 --- a/tests/src/com/android/providers/contacts/NameLookupBuilderTest.java +++ b/tests/src/com/android/providers/contacts/NameLookupBuilderTest.java @@ -19,12 +19,12 @@ package com.android.providers.contacts; import android.provider.ContactsContract.FullNameStyle; import android.test.suitebuilder.annotation.SmallTest; +import junit.framework.TestCase; + import java.text.Collator; import java.util.Arrays; import java.util.Locale; -import junit.framework.TestCase; - /** * Unit tests for {@link NameLookupBuilder}. * diff --git a/tests/src/com/android/providers/contacts/NameSplitterTest.java b/tests/src/com/android/providers/contacts/NameSplitterTest.java index 785fb01..d9007fc 100644 --- a/tests/src/com/android/providers/contacts/NameSplitterTest.java +++ b/tests/src/com/android/providers/contacts/NameSplitterTest.java @@ -16,16 +16,16 @@ package com.android.providers.contacts; -import com.android.providers.contacts.NameSplitter.Name; - import android.provider.ContactsContract.FullNameStyle; import android.provider.ContactsContract.PhoneticNameStyle; import android.test.suitebuilder.annotation.SmallTest; -import java.util.Locale; +import com.android.providers.contacts.NameSplitter.Name; import junit.framework.TestCase; +import java.util.Locale; + /** * Tests for {@link NameSplitter}. * diff --git a/tests/src/com/android/providers/contacts/PhotoLoadingTestCase.java b/tests/src/com/android/providers/contacts/PhotoLoadingTestCase.java index 20058ad..4b159a8 100644 --- a/tests/src/com/android/providers/contacts/PhotoLoadingTestCase.java +++ b/tests/src/com/android/providers/contacts/PhotoLoadingTestCase.java @@ -16,12 +16,12 @@ package com.android.providers.contacts; -import com.google.android.collect.Maps; - import android.content.res.Resources; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; +import com.google.android.collect.Maps; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; diff --git a/tests/src/com/android/providers/contacts/PostalSplitterForJapaneseTest.java b/tests/src/com/android/providers/contacts/PostalSplitterForJapaneseTest.java index b4be173..eba9d53 100644 --- a/tests/src/com/android/providers/contacts/PostalSplitterForJapaneseTest.java +++ b/tests/src/com/android/providers/contacts/PostalSplitterForJapaneseTest.java @@ -16,14 +16,14 @@ package com.android.providers.contacts; -import com.android.providers.contacts.PostalSplitter.Postal; - import android.test.suitebuilder.annotation.SmallTest; -import java.util.Locale; +import com.android.providers.contacts.PostalSplitter.Postal; import junit.framework.TestCase; +import java.util.Locale; + /** * Tests for {@link PostalSplitter}, especially for ja_JP locale. * This class depends on the assumption that all the tests in {@link NameSplitterTest} pass. diff --git a/tests/src/com/android/providers/contacts/PostalSplitterTest.java b/tests/src/com/android/providers/contacts/PostalSplitterTest.java index 6778b79..d12b3f3 100644 --- a/tests/src/com/android/providers/contacts/PostalSplitterTest.java +++ b/tests/src/com/android/providers/contacts/PostalSplitterTest.java @@ -16,14 +16,14 @@ package com.android.providers.contacts; -import com.android.providers.contacts.PostalSplitter.Postal; - import android.test.suitebuilder.annotation.SmallTest; -import java.util.Locale; +import com.android.providers.contacts.PostalSplitter.Postal; import junit.framework.TestCase; +import java.util.Locale; + /** * Tests for {@link PostalSplitter}, especially for en_US locale. * diff --git a/tests/src/com/android/providers/contacts/SqlInjectionDetectionTest.java b/tests/src/com/android/providers/contacts/SqlInjectionDetectionTest.java index f4b8bab..7b3fe95 100644 --- a/tests/src/com/android/providers/contacts/SqlInjectionDetectionTest.java +++ b/tests/src/com/android/providers/contacts/SqlInjectionDetectionTest.java @@ -27,8 +27,6 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.Contacts; import android.test.suitebuilder.annotation.MediumTest; -import junit.framework.Assert; - /** * Unit tests for {@link ContactsProvider2}, to make sure the queries don't allow sql injection. * diff --git a/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java b/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java index cd5383d..1d127c7 100644 --- a/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java +++ b/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java @@ -21,10 +21,10 @@ import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.util.Log; -import java.util.Locale; - import junit.framework.Assert; +import java.util.Locale; + /** * A version of {@link ContactsProvider2} class that performs aggregation * synchronously and wipes all data at construction time. diff --git a/tests/src/com/android/providers/contacts/SynchronousProfileProvider.java b/tests/src/com/android/providers/contacts/SynchronousProfileProvider.java index 93ad70f..308e67a 100644 --- a/tests/src/com/android/providers/contacts/SynchronousProfileProvider.java +++ b/tests/src/com/android/providers/contacts/SynchronousProfileProvider.java @@ -16,7 +16,6 @@ package com.android.providers.contacts; -import android.accounts.Account; import android.content.Context; import java.util.Locale; diff --git a/tests/src/com/android/providers/contacts/TestUtils.java b/tests/src/com/android/providers/contacts/TestUtils.java index 00789bf..b6d6a27 100644 --- a/tests/src/com/android/providers/contacts/TestUtils.java +++ b/tests/src/com/android/providers/contacts/TestUtils.java @@ -21,12 +21,12 @@ import android.content.Context; import android.database.Cursor; import android.util.Log; +import junit.framework.Assert; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import junit.framework.Assert; - public class TestUtils { private TestUtils() { } diff --git a/tests/src/com/android/providers/contacts/VCardTest.java b/tests/src/com/android/providers/contacts/VCardTest.java index b022ebd..820c263 100644 --- a/tests/src/com/android/providers/contacts/VCardTest.java +++ b/tests/src/com/android/providers/contacts/VCardTest.java @@ -16,12 +16,12 @@ package com.android.providers.contacts; -import com.android.vcard.VCardComposer; -import com.android.vcard.VCardConfig; - import android.content.ContentResolver; import android.test.suitebuilder.annotation.MediumTest; +import com.android.vcard.VCardComposer; +import com.android.vcard.VCardConfig; + /** * Tests (or integration tests) verifying if vCard library works well with {@link ContentResolver}. * diff --git a/tests/src/com/android/providers/contacts/VoicemailProviderTest.java b/tests/src/com/android/providers/contacts/VoicemailProviderTest.java index 74195b5..8fdbccf 100644 --- a/tests/src/com/android/providers/contacts/VoicemailProviderTest.java +++ b/tests/src/com/android/providers/contacts/VoicemailProviderTest.java @@ -16,8 +16,6 @@ package com.android.providers.contacts; -import com.android.common.io.MoreCloseables; - import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; @@ -30,6 +28,8 @@ import android.provider.VoicemailContract.Voicemails; import android.test.MoreAsserts; import android.test.suitebuilder.annotation.SmallTest; +import com.android.common.io.MoreCloseables; + import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; diff --git a/tests/src/com/android/providers/contacts/aggregation/ContactAggregatorTest.java b/tests/src/com/android/providers/contacts/aggregation/ContactAggregatorTest.java index 795ea9c..16d06c8 100644 --- a/tests/src/com/android/providers/contacts/aggregation/ContactAggregatorTest.java +++ b/tests/src/com/android/providers/contacts/aggregation/ContactAggregatorTest.java @@ -16,25 +16,15 @@ package com.android.providers.contacts.aggregation; -import com.android.providers.contacts.BaseContactsProvider2Test; -import com.android.providers.contacts.ContactsDatabaseHelper.Tables; -import com.android.providers.contacts.ContactsProvider2; -import com.android.providers.contacts.TestUtils; -import com.android.providers.contacts.tests.R; -import com.google.android.collect.Lists; - import android.accounts.Account; import android.content.ContentProviderOperation; import android.content.ContentProviderResult; import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; import android.net.Uri; -import android.provider.BaseColumns; import android.provider.ContactsContract; import android.provider.ContactsContract.AggregationExceptions; -import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.CommonDataKinds.Organization; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Contacts; @@ -46,6 +36,11 @@ import android.provider.ContactsContract.StatusUpdates; import android.test.MoreAsserts; import android.test.suitebuilder.annotation.MediumTest; +import com.android.providers.contacts.BaseContactsProvider2Test; +import com.android.providers.contacts.TestUtils; +import com.android.providers.contacts.tests.R; +import com.google.android.collect.Lists; + /** * Unit tests for {@link ContactAggregator}. * diff --git a/tests/src/com/android/providers/contacts/aggregation/util/NameDistanceTest.java b/tests/src/com/android/providers/contacts/aggregation/util/NameDistanceTest.java index 7f9f053..b833220 100644 --- a/tests/src/com/android/providers/contacts/aggregation/util/NameDistanceTest.java +++ b/tests/src/com/android/providers/contacts/aggregation/util/NameDistanceTest.java @@ -16,12 +16,11 @@ package com.android.providers.contacts.aggregation.util; +import android.test.suitebuilder.annotation.SmallTest; + import com.android.providers.contacts.NameNormalizer; -import com.android.providers.contacts.aggregation.util.NameDistance; import com.android.providers.contacts.util.Hex; -import android.test.suitebuilder.annotation.SmallTest; - import junit.framework.TestCase; /** diff --git a/tests/src/com/android/providers/contacts/util/DBQueryUtilsTest.java b/tests/src/com/android/providers/contacts/util/DBQueryUtilsTest.java index 43f7c06..7769b49 100644 --- a/tests/src/com/android/providers/contacts/util/DBQueryUtilsTest.java +++ b/tests/src/com/android/providers/contacts/util/DBQueryUtilsTest.java @@ -19,13 +19,13 @@ package com.android.providers.contacts.util; import static com.android.providers.contacts.util.DbQueryUtils.checkForSupportedColumns; import static com.android.providers.contacts.util.DbQueryUtils.concatenateClauses; -import com.android.common.content.ProjectionMap; -import com.android.providers.contacts.EvenMoreAsserts; - import android.content.ContentValues; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; +import com.android.common.content.ProjectionMap; +import com.android.providers.contacts.EvenMoreAsserts; + /** * Unit tests for the {@link DbQueryUtils} class. * Run the test like this: diff --git a/tests/src/com/android/providers/contacts/util/MockSharedPreferences.java b/tests/src/com/android/providers/contacts/util/MockSharedPreferences.java index d00e711..574ce19 100644 --- a/tests/src/com/android/providers/contacts/util/MockSharedPreferences.java +++ b/tests/src/com/android/providers/contacts/util/MockSharedPreferences.java @@ -16,10 +16,10 @@ package com.android.providers.contacts.util; -import com.google.android.collect.Maps; - import android.content.SharedPreferences; +import com.google.android.collect.Maps; + import java.util.HashMap; import java.util.Map; import java.util.Set; diff --git a/tests/src/com/android/providers/contacts/util/TypedUriMatcherImplTest.java b/tests/src/com/android/providers/contacts/util/TypedUriMatcherImplTest.java index 48bd608..329e6e2 100644 --- a/tests/src/com/android/providers/contacts/util/TypedUriMatcherImplTest.java +++ b/tests/src/com/android/providers/contacts/util/TypedUriMatcherImplTest.java @@ -20,9 +20,6 @@ import android.net.Uri; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; -import com.android.providers.contacts.util.TypedUriMatcherImpl; -import com.android.providers.contacts.util.UriType; - /** * Unit tests for {@link TypedUriMatcherImpl}. * Run the test like this: |