diff --git a/core/api/current.txt b/core/api/current.txt index e05b9e57866c3..8cc82620fd7ad 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -27405,6 +27405,7 @@ package android.media.tv.interactive { method @CallSuper public void requestStreamVolume(); method @CallSuper public void requestTrackInfoList(); method @CallSuper public void requestTvRecordingInfo(@NonNull String); + method @CallSuper public void requestTvRecordingInfoList(@NonNull int); 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); @@ -27483,6 +27484,7 @@ package android.media.tv.interactive { method public void onRequestStreamVolume(@NonNull String); method public void onRequestTrackInfoList(@NonNull String); method public void onRequestTvRecordingInfo(@NonNull String, @NonNull String); + method public void onRequestTvRecordingInfoList(@NonNull String, @NonNull int); 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); diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppService.java b/media/java/android/media/tv/interactive/TvInteractiveAppService.java index 06bfffbccc39e..d1777cc8cbeed 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppService.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppService.java @@ -1264,9 +1264,9 @@ public abstract class TvInteractiveAppService extends Service { } /** - * Gets the recording info list for the specified recording type + * Gets a list of {@link TvRecordingInfo} for the specified recording type. * - * @hide + * @param type The type of recording to retrieve. */ @CallSuper public void requestTvRecordingInfoList(@NonNull @TvRecordingInfo.TvRecordingListType diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppView.java b/media/java/android/media/tv/interactive/TvInteractiveAppView.java index 02565aab6f958..4a0144041f513 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppView.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppView.java @@ -1083,6 +1083,19 @@ public class TvInteractiveAppView extends ViewGroup { @NonNull String iAppServiceId, @NonNull String recordingId) { } + + /** + * This is called when + * {@link TvInteractiveAppService.Session#requestTvRecordingInfoList(int)} is + * called. + * + * @param iAppServiceId The ID of the TV interactive app service bound to this view. + * @param type The type of recording requested to retrieve. + */ + public void onRequestTvRecordingInfoList( + @NonNull String iAppServiceId, + @NonNull @TvRecordingInfo.TvRecordingListType int type) { + } } /** @@ -1497,6 +1510,21 @@ public class TvInteractiveAppView extends ViewGroup { } } + @Override + public void onRequestTvRecordingInfoList(Session session, + int type) { + if (DEBUG) { + Log.d(TAG, "onRequestRecordingInfoList"); + } + if (this != mSessionCallback) { + Log.w(TAG, "onRequestRecordingInfoList - session not created"); + return; + } + if (mCallback != null) { + mCallback.onRequestTvRecordingInfoList(mIAppServiceId, type); + } + } + @Override public void onRequestSigning( Session session, String id, String algorithm, String alias, byte[] data) {