diff options
author | Fred Quintana <fredq@google.com> | 2009-06-11 12:14:40 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-06-11 14:59:43 -0700 |
commit | c933fb663e4748c4fa3f92fc63649e5199519a86 (patch) | |
tree | c5fb65c738a9318d8e00d12690daa48036836e1d /core | |
parent | 31ff7a366fecc6b5570a9ee970e618e27f730846 (diff) | |
download | frameworks_base-c933fb663e4748c4fa3f92fc63649e5199519a86.zip frameworks_base-c933fb663e4748c4fa3f92fc63649e5199519a86.tar.gz frameworks_base-c933fb663e4748c4fa3f92fc63649e5199519a86.tar.bz2 |
add a data_version column to the data table
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/content/ContentProviderOperation.java | 6 | ||||
-rw-r--r-- | core/java/android/provider/ContactsContract.java | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/content/ContentProviderOperation.java b/core/java/android/content/ContentProviderOperation.java index 001af16..8b0b6ab 100644 --- a/core/java/android/content/ContentProviderOperation.java +++ b/core/java/android/content/ContentProviderOperation.java @@ -369,6 +369,12 @@ public class ContentProviderOperation implements Parcelable { /** Create a ContentProviderOperation from this {@link Builder}. */ public ContentProviderOperation build() { + if (mType == TYPE_UPDATE) { + if ((mValues == null || mValues.size() == 0) + && (mValuesBackReferences == null || mValuesBackReferences.size() == 0)) { + throw new IllegalArgumentException("Empty values"); + } + } return new ContentProviderOperation(this); } diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index cbc76c1..d7e7d8d 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -341,6 +341,14 @@ public final class ContactsContract { */ public static final String IS_RESTRICTED = "is_restricted"; + /** + * The version of this data record. This is a read-only value. The data column is + * guaranteed to not change without the version going up. This value is monotonically + * increasing. + * <P>Type: INTEGER</P> + */ + public static final String DATA_VERSION = "data_version"; + /** Generic data column, the meaning is {@link #MIMETYPE} specific */ public static final String DATA1 = "data1"; /** Generic data column, the meaning is {@link #MIMETYPE} specific */ |