diff options
author | Dmitri Plotnikov <dplotnikov@google.com> | 2010-05-18 15:32:57 -0700 |
---|---|---|
committer | Dmitri Plotnikov <dplotnikov@google.com> | 2010-05-18 15:32:57 -0700 |
commit | e3e79030101447da07547647bad225686eb9b8df (patch) | |
tree | f9d128f6c79ffa15ab64868e9f4bd61a04133d1d /tests | |
parent | 4394086494fe7909aaca70f56fb4bb08beebf303 (diff) | |
download | packages_providers_ContactsProvider-e3e79030101447da07547647bad225686eb9b8df.tar.gz packages_providers_ContactsProvider-e3e79030101447da07547647bad225686eb9b8df.tar.bz2 packages_providers_ContactsProvider-e3e79030101447da07547647bad225686eb9b8df.zip |
Preventing unnecessary update of contact visibility at boot time
Bug: 2511409
Change-Id: I5191cc424adbaa97648db9cedee6573a16b0232c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/providers/contacts/ContactsProvider2Test.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java index 74f600ba..f6b4708c 100644 --- a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java +++ b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java @@ -2629,8 +2629,7 @@ public class ContactsProvider2Test extends BaseContactsProvider2Test { assertNoRowsAndClose(queryGroupMemberships(mAccount)); assertNoRowsAndClose(queryGroupMemberships(mAccountTwo)); - Uri contactUri = findContactUriByRawContactUri( - ContentUris.withAppendedId(RawContacts.CONTENT_URI, r1)); + Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, queryContactId(r1)); assertNotNull(contactUri); // mark r1 as starred via its contact lookup uri @@ -2656,18 +2655,6 @@ public class ContactsProvider2Test extends BaseContactsProvider2Test { assertNoRowsAndClose(queryGroupMemberships(mAccountTwo)); } - private Uri findContactUriByRawContactUri(Uri uri) { - Cursor c = mResolver.query(uri, - new String[]{RawContacts.CONTACT_ID}, - null, - null, - null); - if (c.moveToNext()) { - return ContentUris.withAppendedId(Contacts.CONTENT_URI, c.getLong(0)); - } - return null; - } - public void testStarChangedAfterGroupMembershipChange() { long g1 = createGroup(mAccount, "g1", "t1", 0, false /* autoAdd */, true /* favorite */); long g2 = createGroup(mAccount, "g2", "t2", 0, false /* autoAdd */, false/* favorite */); |