Merge "Update TV Input HAL documentation for device IDs" into udc-dev
diff --git a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
index 5d47317..2c7e32f 100644
--- a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
@@ -30,7 +30,14 @@
     void notify(in TvInputEvent event);
     /**
      * Notifies the client that an TV message event has occurred. For possible event types,
-     * check TvMessageEventType.
+     * check {@link android.hardware.tv.input.TvMessageEventType}.
+     *
+     * The first message in a list of messages contained in a
+     * {@link android.hardware.tv.input.TvMessageEvent} should always have a
+     * {@link android.hardware.tv.input.TvMessage#subType} of "device_id",
+     * otherwise the event is discarded. When the subType of a message is "device_id", the ID of
+     * the device that sent the message should be contained in
+     * {@link android.hardware.tv.input.TvMessage#groupId}
      *
      * @param event Event passed to the client.
      */
diff --git a/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
index 88da538..afa48a9 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessage.aidl
@@ -23,8 +23,13 @@
      */
     const long NO_GROUP_ID = -1;
     /**
-     * Extended data type, like “ATSC A/336 Watermark”, “ATSC_CC”, etc. This is opaque
-     * to the framework.
+     * Extended data type, like “ATSC A/336 Watermark”, “ATSC_CC”, etc. This type is opaque to the
+     * framework except when the subtype is "device_id". If the subtype is "device_id", the ID of
+     * device that sent the message should be contained in {@link #groupId}.
+     *
+     * The first message in a list of messages contained in
+     * {@link android.hardware.tv.input.TvMessageEvent} should always have the subtype "device_id",
+     * otherwise the event is discarded.
      */
     String subType;
     /**
@@ -32,6 +37,9 @@
      * headers and bodies of the same event. For messages that do not have a group, this value
      * should be -1.
      *
+     * If {@link #subType} is "device_id", this value should contain the ID of the device that sent
+     * this message.
+     *
      * As -1 is a reserved value, -1 should not be used as a valid groupId.
      */
     long groupId;