Unhide requestTvRecordingInfo

Test: atest android.media.tv.interactive
Bug: 261648703
Change-Id: Ie1c814e98d5f555085e0c915d6e1f719da921504
This commit is contained in:
David Zhao
2023-01-11 16:14:56 -08:00
parent a496ccded6
commit 8ea5d56a0d
3 changed files with 33 additions and 2 deletions

View File

@@ -27404,6 +27404,7 @@ package android.media.tv.interactive {
method @CallSuper public void requestStopRecording(@NonNull String);
method @CallSuper public void requestStreamVolume();
method @CallSuper public void requestTrackInfoList();
method @CallSuper public void requestTvRecordingInfo(@NonNull String);
method @CallSuper public void sendPlaybackCommandRequest(@NonNull String, @Nullable android.os.Bundle);
method @CallSuper public void setMediaViewEnabled(boolean);
method @CallSuper public void setTvRecordingInfo(@NonNull String, @NonNull android.media.tv.TvRecordingInfo);
@@ -27481,6 +27482,7 @@ package android.media.tv.interactive {
method public void onRequestStopRecording(@NonNull String, @NonNull String);
method public void onRequestStreamVolume(@NonNull String);
method public void onRequestTrackInfoList(@NonNull String);
method public void onRequestTvRecordingInfo(@NonNull String, @NonNull String);
method public void onSetTvRecordingInfo(@NonNull String, @NonNull String, @NonNull android.media.tv.TvRecordingInfo);
method public void onSetVideoBounds(@NonNull String, @NonNull android.graphics.Rect);
method public void onStateChanged(@NonNull String, int, int);

View File

@@ -1244,8 +1244,8 @@ public abstract class TvInteractiveAppService extends Service {
/**
* Gets the recording info for the specified recording
*
* @hide
* @param recordingId The ID of the recording to set the info for. This is provided by the
* TV app in {@link TvInteractiveAppView#notifyRecordingStarted(String)}
*/
@CallSuper
public void requestTvRecordingInfo(@NonNull String recordingId) {

View File

@@ -1069,6 +1069,20 @@ public class TvInteractiveAppView extends ViewGroup {
@NonNull String recordingId,
@NonNull TvRecordingInfo recordingInfo) {
}
/**
* This is called when
* {@link TvInteractiveAppService.Session#requestTvRecordingInfo(String)} is
* called.
*
* @param iAppServiceId The ID of the TV interactive app service bound to this view.
* @param recordingId The ID of the recording to get the info for. This is provided by the
* TV app in {@link TvInteractiveAppView#notifyRecordingStarted(String)}
*/
public void onRequestTvRecordingInfo(
@NonNull String iAppServiceId,
@NonNull String recordingId) {
}
}
/**
@@ -1468,6 +1482,21 @@ public class TvInteractiveAppView extends ViewGroup {
}
}
@Override
public void onRequestTvRecordingInfo(Session session,
String recordingId) {
if (DEBUG) {
Log.d(TAG, "onRequestRecordingInfo");
}
if (this != mSessionCallback) {
Log.w(TAG, "onRequestRecordingInfo - session not created");
return;
}
if (mCallback != null) {
mCallback.onRequestTvRecordingInfo(mIAppServiceId, recordingId);
}
}
@Override
public void onRequestSigning(
Session session, String id, String algorithm, String alias, byte[] data) {