diff options
author | Dmitri Plotnikov <dplotnikov@google.com> | 2010-01-20 12:12:11 -0800 |
---|---|---|
committer | Dmitri Plotnikov <dplotnikov@google.com> | 2010-01-20 12:12:11 -0800 |
commit | 918007b75539f5eabfd173a369c2da628c607ba7 (patch) | |
tree | ce88e8a035a9a74b38d70eed294466a45f14cf8d | |
parent | 867e8eb753422bb9ef83297b72f925b92040daf9 (diff) | |
download | frameworks_base-918007b75539f5eabfd173a369c2da628c607ba7.zip frameworks_base-918007b75539f5eabfd173a369c2da628c607ba7.tar.gz frameworks_base-918007b75539f5eabfd173a369c2da628c607ba7.tar.bz2 |
Introducing the notion of "verified name" on a raw contact.
This flag can be set by a sync adapter if it is certain that the
name is correct (a social network sync adapter would be a good example
of this). It can also be explicitly set by the user in the Contact
Edit UI.
Bug: 2164422
Change-Id: Id46e04c28eeb0dc386adfc6ad8988dda50824e2b
-rw-r--r-- | core/java/android/provider/ContactsContract.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 5819b59..16746d4 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -1102,6 +1102,33 @@ public final class ContactsContract { * <P>Type: INTEGER</P> */ public static final String DELETED = "deleted"; + + /** + * The "name_verified" flag: "1" means that the name fields on this raw + * contact can be trusted and therefore should be used for the entire + * aggregated contact. + * <p> + * If an aggregated contact contains more than one raw contact with a + * verified name, one of those verified names is chosen at random. + * If an aggregated contact contains no verified names, the + * name is chosen randomly from the constituent raw contacts. + * </p> + * <p> + * Updating this flag from "0" to "1" automatically resets it to "0" on + * all other raw contacts in the same aggregated contact. + * </p> + * <p> + * Sync adapters should only specify a value for this column when + * inserting a raw contact and leave it out when doing an update. + * </p> + * <p> + * The default value is "0" + * </p> + * <p>Type: INTEGER</p> + * + * @hide + */ + public static final String NAME_VERIFIED = "name_verified"; } /** @@ -1673,6 +1700,7 @@ public final class ContactsContract { DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, CONTACT_ID); DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, STARRED); DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, IS_RESTRICTED); + DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, NAME_VERIFIED); android.content.Entity contact = new android.content.Entity(cv); // read data rows until the contact id changes |