diff options
author | Yorke Lee <yorkelee@google.com> | 2014-07-10 11:38:55 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-07-14 19:22:13 -0700 |
commit | 495c732e471c1c68db91ca6e824440130fdb7146 (patch) | |
tree | d36facda385d7f072d82a830533a8ebf5e420d11 /tests | |
parent | b7519fcdeead0fdcdc4dfc108c35fb9dfc5c61c2 (diff) | |
download | android_packages_apps_ContactsCommon-495c732e471c1c68db91ca6e824440130fdb7146.tar.gz android_packages_apps_ContactsCommon-495c732e471c1c68db91ca6e824440130fdb7146.tar.bz2 android_packages_apps_ContactsCommon-495c732e471c1c68db91ca6e824440130fdb7146.zip |
Make ContactPreferences use SharedPreferences instead of System settings (3/5)
* Move constants that originally lived in the framework into ContactsCommon
* Use SharedPreferences instead of System settings to persist preferences
* Use a SharedPreferenceListener to monitor changes instead of a content observer
on system settings
* Move DisplayOrderPreference and SortOrderPreference into ContactsCommon so that
it can be used by Dialer
* Create base DialerSettingsActivity in Dialer, and make GoogleDialerSettingsActivity
extend it
Bug: 16153186
Change-Id: Ib3500b82b03960a30b565f1024f20f78879d3ce3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/contacts/common/list/ContactListItemViewTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java b/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java index 9c69f246..222863c6 100644 --- a/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java +++ b/tests/src/com/android/contacts/common/list/ContactListItemViewTest.java @@ -26,6 +26,7 @@ import android.widget.TextView; import com.android.contacts.common.format.SpannedTestUtils; import com.android.contacts.common.list.ContactListItemView; +import com.android.contacts.common.preference.ContactsPreferences; /** * Unit tests for {@link com.android.contacts.common.list.ContactListItemView}. @@ -56,7 +57,7 @@ public class ContactListItemViewTest extends AndroidTestCase { Cursor cursor = createCursor("John Doe", "Doe John"); ContactListItemView view = createView(); - view.showDisplayName(cursor, 0, ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY); + view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); assertEquals(view.getNameTextView().getText().toString(), "John Doe"); } @@ -66,7 +67,7 @@ public class ContactListItemViewTest extends AndroidTestCase { ContactListItemView view = createView(); view.setUnknownNameText("unknown"); - view.showDisplayName(cursor, 0, ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY); + view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); assertEquals(view.getNameTextView().getText().toString(), "unknown"); } @@ -76,7 +77,7 @@ public class ContactListItemViewTest extends AndroidTestCase { ContactListItemView view = createView(); view.setHighlightedPrefix("DOE"); - view.showDisplayName(cursor, 0, ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY); + view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_PRIMARY); CharSequence seq = view.getNameTextView().getText(); assertEquals("John Doe", seq.toString()); @@ -88,7 +89,7 @@ public class ContactListItemViewTest extends AndroidTestCase { ContactListItemView view = createView(); view.setHighlightedPrefix("DOE"); - view.showDisplayName(cursor, 0, ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE); + view.showDisplayName(cursor, 0, ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE); CharSequence seq = view.getNameTextView().getText(); assertEquals("John Doe", seq.toString()); |