From ab5742dd63f4e62ee0f55f786854c024ef8c5bb4 Mon Sep 17 00:00:00 2001 From: Evan Millar Date: Tue, 2 Jun 2009 16:21:45 -0700 Subject: Adds "is_primary" and "is_super_primary" columns to DataColumns. Replaces the "primary" values stored in generic data fields with standard "is_primary" and "is_super_primary" fields in the DataColumns class. This makes it much easier to watch for changes to these fields and enforce the uniqueness of primary fields. --- core/java/android/provider/ContactsContract.java | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 835a5f646e51..62e95e8ab749 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -290,6 +290,19 @@ public final class ContactsContract { */ public static final String CONTACT_ID = "contact_id"; + /** + * Whether this is the primary entry of its kind for the contact it belongs to + *

Type: INTEGER (if set, non-0 means true)

+ */ + public static final String IS_PRIMARY = "is_primary"; + + /** + * Whether this is the primary entry of its kind for the aggregate it belongs to. Any data + * record that is "super primary" must also be "primary". + *

Type: INTEGER (if set, non-0 means true)

+ */ + public static final String IS_SUPER_PRIMARY = "is_super_primary"; + /** Generic data column, the meaning is {@link #MIMETYPE} specific */ public static final String DATA1 = "data1"; /** Generic data column, the meaning is {@link #MIMETYPE} specific */ @@ -409,12 +422,6 @@ public final class ContactsContract { *

Type: TEXT

*/ public static final String LABEL = "data3"; - - /** - * Whether this is the primary entry of its kind for the contact it belongs to - *

Type: INTEGER (if set, non-0 means true)

- */ - public static final String ISPRIMARY = "data4"; } /** @@ -642,12 +649,6 @@ public final class ContactsContract { *

Type: TEXT

*/ public static final String TITLE = "data4"; - - /** - * Whether this is the primary organization - *

Type: INTEGER (if set, non-0 means true)

- */ - public static final String ISPRIMARY = "data5"; } /** -- cgit v1.2.3-59-g8ed1b