am b93ce4ae: Merge "Several API changes as requested by ES:"
* commit 'b93ce4ae861f86eb86bc52a8444be7abd5f538d4':
Several API changes as requested by ES:
diff --git a/api/current.txt b/api/current.txt
index 08cd44f..903b084 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -16391,8 +16391,6 @@
}
protected static abstract interface ContactsContract.GroupsColumns {
- field public static final java.lang.String ACTION = "action";
- field public static final java.lang.String ACTION_URI = "action_uri";
field public static final java.lang.String AUTO_ADD = "auto_add";
field public static final java.lang.String DATA_SET = "data_set";
field public static final java.lang.String DELETED = "deleted";
@@ -16589,12 +16587,14 @@
}
protected static abstract interface ContactsContract.StreamItemPhotosColumns {
- field public static final java.lang.String ACTION = "action";
- field public static final java.lang.String ACTION_URI = "action_uri";
field public static final java.lang.String PHOTO_FILE_ID = "photo_file_id";
field public static final java.lang.String PHOTO_URI = "photo_uri";
field public static final java.lang.String SORT_INDEX = "sort_index";
field public static final java.lang.String STREAM_ITEM_ID = "stream_item_id";
+ field public static final java.lang.String SYNC1 = "stream_item_photo_sync1";
+ field public static final java.lang.String SYNC2 = "stream_item_photo_sync2";
+ field public static final java.lang.String SYNC3 = "stream_item_photo_sync3";
+ field public static final java.lang.String SYNC4 = "stream_item_photo_sync4";
}
public static final class ContactsContract.StreamItems implements android.provider.BaseColumns android.provider.ContactsContract.StreamItemsColumns {
@@ -16609,13 +16609,19 @@
}
protected static abstract interface ContactsContract.StreamItemsColumns {
- field public static final java.lang.String ACTION = "action";
- field public static final java.lang.String ACTION_URI = "action_uri";
+ field public static final java.lang.String ACCOUNT_NAME = "account_name";
+ field public static final java.lang.String ACCOUNT_TYPE = "account_type";
field public static final java.lang.String COMMENTS = "comments";
+ field public static final java.lang.String DATA_SET = "data_set";
field public static final java.lang.String RAW_CONTACT_ID = "raw_contact_id";
+ field public static final java.lang.String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
field public static final java.lang.String RES_ICON = "icon";
field public static final java.lang.String RES_LABEL = "label";
field public static final java.lang.String RES_PACKAGE = "res_package";
+ field public static final java.lang.String SYNC1 = "stream_item_sync1";
+ field public static final java.lang.String SYNC2 = "stream_item_sync2";
+ field public static final java.lang.String SYNC3 = "stream_item_sync3";
+ field public static final java.lang.String SYNC4 = "stream_item_sync4";
field public static final java.lang.String TEXT = "text";
field public static final java.lang.String TIMESTAMP = "timestamp";
}
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 5765dde..d867e35 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -2890,8 +2890,6 @@
* values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
* values.put(StreamItems.TIMESTAMP, timestamp);
* values.put(StreamItems.COMMENTS, "3 people reshared this");
- * values.put(StreamItems.ACTION, action);
- * values.put(StreamItems.ACTION_URI, actionUri);
* Uri streamItemUri = getContentResolver().insert(
* Uri.withAppendedPath(ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId),
* RawContacts.StreamItems.CONTENT_DIRECTORY), values);
@@ -2905,8 +2903,6 @@
* values.put(StreamItems.TEXT, "Breakfasted at Tiffanys");
* values.put(StreamItems.TIMESTAMP, timestamp);
* values.put(StreamItems.COMMENTS, "3 people reshared this");
- * values.put(StreamItems.ACTION, action);
- * values.put(StreamItems.ACTION_URI, actionUri);
* Uri streamItemUri = getContentResolver().insert(StreamItems.CONTENT_URI, values);
* long streamItemId = ContentUris.parseId(streamItemUri);
* </dd>
@@ -2924,8 +2920,6 @@
* values.clear();
* values.put(StreamItemPhotos.SORT_INDEX, 1);
* values.put(StreamItemPhotos.PHOTO, photoData);
- * values.put(StreamItemPhotos.ACTION, action);
- * values.put(StreamItemPhotos.ACTION_URI, actionUri);
* getContentResolver().insert(Uri.withAppendedPath(
* ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId),
* StreamItems.StreamItemPhotos.CONTENT_DIRECTORY), values);
@@ -2938,8 +2932,6 @@
* values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
* values.put(StreamItemPhotos.SORT_INDEX, 1);
* values.put(StreamItemPhotos.PHOTO, photoData);
- * values.put(StreamItemPhotos.ACTION, action);
- * values.put(StreamItemPhotos.ACTION_URI, actionUri);
* getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
* </pre>
* Note that this latter form allows the insertion of a stream item and its
@@ -3081,16 +3073,56 @@
public static final String RES_PACKAGE = "res_package";
/**
- * The resource ID of the icon for the source of the stream item.
- * This resource should be scoped by the {@link #RES_PACKAGE}.
- * <P>Type: NUMBER</P>
+ * The account type to which the raw_contact of this item is associated. See
+ * {@link RawContacts#ACCOUNT_TYPE}
+ *
+ * <p>TYPE: text</p>
+ * <p>read-only</p>
+ */
+ public static final String ACCOUNT_TYPE = "account_type";
+
+ /**
+ * The account name to which the raw_contact of this item is associated. See
+ * {@link RawContacts#ACCOUNT_NAME}
+ *
+ * <p>TYPE: text</p>
+ * <p>read-only</p>
+ */
+ public static final String ACCOUNT_NAME = "account_name";
+
+ /**
+ * The data set within the account that the raw_contact of this row belongs to. This allows
+ * multiple sync adapters for the same account type to distinguish between
+ * each others' data.
+ * {@link RawContacts#DATA_SET}
+ *
+ * <P>Type: TEXT</P>
+ * <p>read-only</p>
+ */
+ public static final String DATA_SET = "data_set";
+
+ /**
+ * The source_id of the raw_contact that this row belongs to.
+ * {@link RawContacts#SOURCE_ID}
+ *
+ * <P>Type: TEXT</P>
+ * <p>read-only</p>
+ */
+ public static final String RAW_CONTACT_SOURCE_ID = "raw_contact_source_id";
+
+ /**
+ * The resource name of the icon for the source of the stream item.
+ * This resource should be scoped by the {@link #RES_PACKAGE}. As this can only reference
+ * drawables, the "@drawable/" prefix must be omitted.
+ * <P>Type: TEXT</P>
*/
public static final String RES_ICON = "icon";
/**
- * The resource ID of the label describing the source of the status update, e.g. "Google
- * Talk". This resource should be scoped by the {@link #RES_PACKAGE}.
- * <p>Type: NUMBER</p>
+ * The resource name of the label describing the source of the status update, e.g. "Google
+ * Talk". This resource should be scoped by the {@link #RES_PACKAGE}. As this can only
+ * reference strings, the "@string/" prefix must be omitted.
+ * <p>Type: TEXT</p>
*/
public static final String RES_LABEL = "label";
@@ -3136,18 +3168,14 @@
*/
public static final String COMMENTS = "comments";
- /**
- * The activity action to execute when the item is tapped.
- * <P>Type: TEXT</P>
- */
- public static final String ACTION = "action";
-
- /**
- * The URI that is launched when the item is pressed. May be handled by
- * the source app, but could also reference a website (e.g. YouTube).
- * <P>Type: TEXT</P>
- */
- public static final String ACTION_URI = "action_uri";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC1 = "stream_item_sync1";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC2 = "stream_item_sync2";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC3 = "stream_item_sync3";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC4 = "stream_item_sync4";
}
/**
@@ -3171,8 +3199,6 @@
* ContentValues values = new ContentValues();
* values.put(StreamItemPhotos.SORT_INDEX, 1);
* values.put(StreamItemPhotos.PHOTO, photoData);
- * values.put(StreamItemPhotos.ACTION, action);
- * values.put(StreamItemPhotos.ACTION_URI, actionUri);
* Uri photoUri = getContentResolver().insert(Uri.withAppendedPath(
* ContentUris.withAppendedId(StreamItems.CONTENT_URI, streamItemId)
* StreamItems.StreamItemPhotos#CONTENT_DIRECTORY), values);
@@ -3186,8 +3212,6 @@
* values.put(StreamItemPhotos.STREAM_ITEM_ID, streamItemId);
* values.put(StreamItemPhotos.SORT_INDEX, 1);
* values.put(StreamItemPhotos.PHOTO, photoData);
- * values.put(StreamItemPhotos.ACTION, action);
- * values.put(StreamItemPhotos.ACTION_URI, actionUri);
* Uri photoUri = getContentResolver().insert(StreamItems.CONTENT_PHOTO_URI, values);
* long photoId = ContentUris.parseId(photoUri);
* </pre>
@@ -3353,18 +3377,14 @@
*/
public static final String PHOTO_URI = "photo_uri";
- /**
- * The activity action to execute when the photo is tapped.
- * <P>Type: TEXT</P>
- */
- public static final String ACTION = "action";
-
- /**
- * The URI that is launched when the photo is pressed. May be handled by
- * the source app, but could also reference a website (e.g. YouTube).
- * <P>Type: TEXT</P>
- */
- public static final String ACTION_URI = "action_uri";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC1 = "stream_item_photo_sync1";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC2 = "stream_item_photo_sync2";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC3 = "stream_item_photo_sync3";
+ /** Generic column for use by sync adapters. */
+ public static final String SYNC4 = "stream_item_photo_sync4";
}
/**
@@ -6496,28 +6516,6 @@
public static final String NOTES = "notes";
/**
- * The Activity action to open the group in the source app (e.g.
- * {@link Intent#ACTION_VIEW}). Can be NULL if the group does not have a dedicated viewer.
- * This is used in conjunction with {@link #ACTION_URI}: In order to show an "Open in
- * (sourceapp)"-button, both of these fields must be set
- * <p>
- * Type: TEXT
- */
- public static final String ACTION = "action";
-
-
- /**
- * Uri to open the group in the source app.
- * Can be NULL if the group does not have a dedicated viewer.
- * This is used in conjunction with {@link #ACTION}: In order to show an "Open in
- * (sourceapp)"-button, both of these fields must be set
- * <p>
- * Type: TEXT
- */
- public static final String ACTION_URI = "action_uri";
-
-
- /**
* The ID of this group if it is a System Group, i.e. a group that has a special meaning
* to the sync adapter, null otherwise.
* <P>Type: TEXT</P>