Update TvMessageEvent to include a deviceId field
Test: mmm
Bug: 302208143
Change-Id: I45f8ba6d45dc7f4afbdbcf8d29e452944adea2ba
diff --git a/compatibility_matrices/compatibility_matrix.9.xml b/compatibility_matrices/compatibility_matrix.9.xml
index 0013923..e5e469e 100644
--- a/compatibility_matrices/compatibility_matrix.9.xml
+++ b/compatibility_matrices/compatibility_matrix.9.xml
@@ -611,7 +611,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.tv.input</name>
- <version>1</version>
+ <version>1-2</version>
<interface>
<name>ITvInput</name>
<instance>default</instance>
diff --git a/tv/input/aidl/Android.bp b/tv/input/aidl/Android.bp
index 35f510a..cd69130 100644
--- a/tv/input/aidl/Android.bp
+++ b/tv/input/aidl/Android.bp
@@ -35,6 +35,5 @@
],
},
],
- frozen: true,
-
+ frozen: false,
}
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
index 94fe665..3c1cb74 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/TvMessageEvent.aidl
@@ -37,4 +37,5 @@
android.hardware.tv.input.TvMessageEventType type;
int streamId;
android.hardware.tv.input.TvMessage[] messages;
+ int deviceId;
}
diff --git a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
index a3afd41..4121fc7 100644
--- a/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/ITvInputCallback.aidl
@@ -32,17 +32,20 @@
* Notifies the client that an TV message event has occurred. For possible event types,
* check {@link android.hardware.tv.input.TvMessageEventType}.
*
- * The first message in a list of messages contained in a
+ * <p> For implementations of version 1, 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}
+ * {@link android.hardware.tv.input.TvMessage#groupId}.
*
- * Invoking this callback for the first time immediately triggers
+ * <p> For version 2 and beyond, the device ID should be contained in
+ * {@link android.hardware.tv.input.TvMessageEvent#deviceId}.
+ *
+ * <p> Invoking this callback for the first time immediately triggers
* {@link android.hardware.tv.input.ITvInput#getTvMessageQueueDesc}. It is
- * expected for the queue to be ready with
- * the relevant messages for the event before this callback is called.
+ * expected for the queue to be ready with the relevant messages for the event before this
+ * callback is called.
*
* @param event Event passed to the client.
*/
diff --git a/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl b/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
index 74a078a..e04a725 100644
--- a/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/TvMessageEvent.aidl
@@ -25,4 +25,5 @@
int streamId;
TvMessage[] messages;
+ int deviceId;
}
diff --git a/tv/input/aidl/vts/functional/Android.bp b/tv/input/aidl/vts/functional/Android.bp
index 22487ea..930c5a8 100644
--- a/tv/input/aidl/vts/functional/Android.bp
+++ b/tv/input/aidl/vts/functional/Android.bp
@@ -32,7 +32,7 @@
"libvndksupport",
"libfmq",
"android.hardware.common.fmq-V1-ndk",
- "android.hardware.tv.input-V1-ndk",
+ "android.hardware.tv.input-V2-ndk",
],
require_root: true,
}