Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c933fb66 authored by Fred Quintana's avatar Fred Quintana
Browse files

add a data_version column to the data table

parent 31ff7a36
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
        }

+8 −0
Original line number Diff line number Diff line
@@ -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 */