OSDN Git Service

Added ACCOUNT_TYPE_AND_DATA_SET pseudo-column.
authorDave Santoro <dsantoro@google.com>
Mon, 25 Jul 2011 23:44:45 +0000 (16:44 -0700)
committerDave Santoro <dsantoro@google.com>
Thu, 28 Jul 2011 00:16:12 +0000 (17:16 -0700)
This was added to simplify some logic in the provider and app, as
there are places that can simply compare the concatenation of the
account type and data set.

Also added a DATA_SET extra for contact creation, to allow for this
value to be passed around via intents.

Bug 5077096

Change-Id: Ia0634cfcf4590fd90ccb5cb99360c38c86f08d25

core/java/android/provider/ContactsContract.java

index b2c1386..5765dde 100644 (file)
@@ -1973,6 +1973,16 @@ public final class ContactsContract {
         public static final String DATA_SET = "data_set";
 
         /**
+         * A concatenation of the account type and data set (delimited by a forward
+         * slash) - if the data set is empty, this will be the same as the account
+         * type.  For applications that need to be aware of the data set, this can
+         * be used instead of account type to distinguish sets of data.  This is
+         * never intended to be used for specifying accounts.
+         * @hide
+         */
+        public static final String ACCOUNT_TYPE_AND_DATA_SET = "account_type_and_data_set";
+
+        /**
          * The aggregation mode for this contact.
          * <P>Type: INTEGER</P>
          */
@@ -6444,6 +6454,16 @@ public final class ContactsContract {
         public static final String DATA_SET = "data_set";
 
         /**
+         * A concatenation of the account type and data set (delimited by a forward
+         * slash) - if the data set is empty, this will be the same as the account
+         * type.  For applications that need to be aware of the data set, this can
+         * be used instead of account type to distinguish sets of data.  This is
+         * never intended to be used for specifying accounts.
+         * @hide
+         */
+        public static final String ACCOUNT_TYPE_AND_DATA_SET = "account_type_and_data_set";
+
+        /**
          * The display title of this group.
          * <p>
          * Type: TEXT
@@ -7871,6 +7891,19 @@ public final class ContactsContract {
              * @hide
              */
             public static final String ACCOUNT = "com.android.contacts.extra.ACCOUNT";
+
+            /**
+             * Used to specify the data set within the account in which to create the
+             * new contact.
+             * <p>
+             * This value is optional - if it is not specified, the contact will be
+             * created in the base account, with no data set.
+             * <p>
+             * Type: String
+             *
+             * @hide
+             */
+            public static final String DATA_SET = "com.android.contacts.extra.DATA_SET";
         }
     }
 }