Merge "Update TvMessageEvent to include a deviceId field" into main

This commit is contained in:
David Zhao
2023-10-17 22:10:06 +00:00
committed by Android (Google) Code Review
6 changed files with 13 additions and 9 deletions

View File

@@ -601,7 +601,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>

View File

@@ -35,6 +35,5 @@ aidl_interface {
],
},
],
frozen: true,
frozen: false,
}

View File

@@ -37,4 +37,5 @@ parcelable TvMessageEvent {
android.hardware.tv.input.TvMessageEventType type;
int streamId;
android.hardware.tv.input.TvMessage[] messages;
int deviceId;
}

View File

@@ -32,17 +32,20 @@ interface ITvInputCallback {
* 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.
*/

View File

@@ -25,4 +25,5 @@ parcelable TvMessageEvent {
int streamId;
TvMessage[] messages;
int deviceId;
}

View File

@@ -32,7 +32,7 @@ cc_test {
"libvndksupport",
"libfmq",
"android.hardware.common.fmq-V1-ndk",
"android.hardware.tv.input-V1-ndk",
"android.hardware.tv.input-V2-ndk",
],
require_root: true,
}