Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e809dbde authored by David Zhao's avatar David Zhao
Browse files

Unhide requestTvRecordingInfoList

Also adds a callback that was missed when implementing the api.

Bug: 261648703
Test: atest android.media.tv.interactive
Change-Id: I7c41483c231557e8bb3f87228082e6f6126b6223
parent 8ea5d56a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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
+28 −0
Original line number Diff line number Diff line
@@ -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) {