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

Commit 57ac3d59 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Moved owning package and restricted flag to Contact.

Instead of having unique owner packages and restriction
flags being enforced on each Data item, I moved these
columns up to the Contact level.  This approach greatly
simplifies the provider logic.
parent afed82bc
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -260,6 +260,19 @@ public final class ContactsContract {
         */
        private Contacts()  {}

        /**
         * The package name that owns this contact and all of its details. This
         * package has control over the {@link #IS_RESTRICTED} flag, and can
         * grant {@link RestrictionExceptions} to other packages.
         */
        public static final String PACKAGE = "package";

        /**
         * Flag indicating that this data entry has been restricted by the owner
         * {@link #PACKAGE}.
         */
        public static final String IS_RESTRICTED = "is_restricted";

        /**
         * A reference to the {@link Accounts#_ID} that this data belongs to.
         */
@@ -331,11 +344,6 @@ public final class ContactsContract {
    }

    private interface DataColumns {
        /**
         * The package name that defines this type of data.
         */
        public static final String PACKAGE = "package";

        /**
         * The mime-type of the item represented by this row.
         */
@@ -360,12 +368,6 @@ public final class ContactsContract {
         */
        public static final String IS_SUPER_PRIMARY = "is_super_primary";

        /**
         * Flag indicating that this data entry has been restricted by the owner
         * {@link #PACKAGE}.
         */
        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