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

Commit 5b31498b authored by Vasu Nori's avatar Vasu Nori
Browse files

add video/audio chat-compatibility modes to ContactsContract

Change-Id: Ic0b04017ad4216f1a1c5f07fa9d27e6970ded931
parent 2c87e9c9
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
@@ -131672,6 +131672,50 @@
 visibility="public"
>
</field>
<field name="CAPABILITY_HAS_CAMERA"
 type="int"
 transient="false"
 volatile="false"
 value="4"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CAPABILITY_HAS_VIDEO_PLAYBACK_ONLY"
 type="int"
 transient="false"
 volatile="false"
 value="1"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CAPABILITY_HAS_VOICE"
 type="int"
 transient="false"
 volatile="false"
 value="2"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CHAT_CAPABILITY"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;chat_capability&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="DO_NOT_DISTURB"
 type="int"
 transient="false"
@@ -134045,6 +134089,17 @@
 deprecated="not deprecated"
 visibility="protected"
>
<field name="CONTACT_CHAT_CAPABILITY"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;contact_chat_capability&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="CONTACT_PRESENCE"
 type="java.lang.String"
 transient="false"
+49 −0
Original line number Diff line number Diff line
@@ -408,6 +408,13 @@ public final class ContactsContract {
         */
        public static final String CONTACT_PRESENCE = "contact_presence";

        /**
         * Contact Chat Capabilities. See {@link StatusColumns#CHAT_CAPABILITY} for individual
         * definitions.
         * <p>Type: NUMBER</p>
         */
        public static final String CONTACT_CHAT_CAPABILITY = "contact_chat_capability";

        /**
         * Contact's latest status update.
         * <p>Type: TEXT</p>
@@ -1950,6 +1957,29 @@ public final class ContactsContract {
         * <p>Type: NUMBER</p>
         */
        public static final String STATUS_ICON = "status_icon";

        /**
         * Contact's audio/video chat capability level.
         * <P>Type: INTEGER (one of the values below)</P>
         */
        public static final String CHAT_CAPABILITY = "chat_capability";

        /**
         * An allowed value of {@link #CHAT_CAPABILITY}. Indicates that the contact's device can
         * display a video feed.
         */
        public static final int CAPABILITY_HAS_VIDEO_PLAYBACK_ONLY = 1;

        /**
         * An allowed value of {@link #CHAT_CAPABILITY}. Indicates audio-chat capability.
         */
        public static final int CAPABILITY_HAS_VOICE = 2;

        /**
         * An allowed value of {@link #CHAT_CAPABILITY}. Indicates that the contact's device has a
         * camera that can be used for video chat (e.g. a front-facing camera on a phone).
         */
        public static final int CAPABILITY_HAS_CAMERA = 4;
    }

    /**
@@ -3095,6 +3125,25 @@ public final class ContactsContract {
     * </td>
     * </tr>
     * <tr>
     * <td>int</td>
     * <td>{@link #CHAT_CAPABILITY}</td>
     * <td>read/write</td>
     * <td>Contact IM chat compatibility value. The allowed values are:
     * <p>
     * <ul>
     * <li>{@link #CAPABILITY_HAS_VIDEO_PLAYBACK_ONLY}</li>
     * <li>{@link #CAPABILITY_HAS_VOICE}</li>
     * <li>{@link #CAPABILITY_HAS_CAMERA}</li>
     * </ul>
     * </p>
     * <p>
     * Since chat compatibility is inherently volatile as the contact's availability moves from
     * one device to another, the content provider may choose not to store this field in long-term
     * storage.
     * </p>
     * </td>
     * </tr>
     * <tr>
     * <td>String</td>
     * <td>{@link #STATUS}</td>
     * <td>read/write</td>