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

Commit 8fafe497 authored by Shubang Lu's avatar Shubang Lu Committed by Android (Google) Code Review
Browse files

Merge "[TIAF] Unhide recording related APIs"

parents c13d7e93 d0e3a668
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -27387,6 +27387,7 @@ package android.media.tv {
    method public void resumeRecording();
    method public void resumeRecording(@NonNull android.os.Bundle);
    method public void sendAppPrivateCommand(@NonNull String, android.os.Bundle);
    method public void setTvInteractiveAppView(@Nullable android.media.tv.interactive.TvInteractiveAppView, @Nullable String);
    method public void startRecording(@Nullable android.net.Uri);
    method public void startRecording(@Nullable android.net.Uri, @NonNull android.os.Bundle);
    method public void stopRecording();
@@ -27675,8 +27676,13 @@ package android.media.tv.interactive {
    method public boolean onKeyMultiple(int, int, @NonNull android.view.KeyEvent);
    method public boolean onKeyUp(int, @NonNull android.view.KeyEvent);
    method public void onMediaViewSizeChanged(@Px int, @Px int);
    method public void onRecordingStarted(@NonNull String);
    method public void onRecordingConnectionFailed(@NonNull String, @NonNull String);
    method public void onRecordingDisconnected(@NonNull String, @NonNull String);
    method public void onRecordingError(@NonNull String, int);
    method public void onRecordingScheduled(@NonNull String, @Nullable String);
    method public void onRecordingStarted(@NonNull String, @Nullable String);
    method public void onRecordingStopped(@NonNull String);
    method public void onRecordingTuned(@NonNull String, @NonNull android.net.Uri);
    method public abstract void onRelease();
    method public void onResetInteractiveApp();
    method public abstract boolean onSetSurface(@Nullable android.view.Surface);
@@ -27711,8 +27717,10 @@ package android.media.tv.interactive {
    method @CallSuper public void requestCurrentChannelUri();
    method @CallSuper public void requestCurrentTvInputId();
    method @CallSuper public void requestCurrentVideoBounds();
    method @CallSuper public void requestScheduleRecording(@NonNull String, @NonNull String, @NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.os.Bundle);
    method @CallSuper public void requestScheduleRecording(@NonNull String, @NonNull String, @NonNull android.net.Uri, long, long, int, @NonNull android.os.Bundle);
    method @CallSuper public void requestSigning(@NonNull String, @NonNull String, @NonNull String, @NonNull byte[]);
    method @CallSuper public void requestStartRecording(@Nullable android.net.Uri);
    method @CallSuper public void requestStartRecording(@NonNull String, @Nullable android.net.Uri);
    method @CallSuper public void requestStopRecording(@NonNull String);
    method @CallSuper public void requestStreamVolume();
    method @CallSuper public void requestTimeShiftMode();
@@ -27753,7 +27761,8 @@ package android.media.tv.interactive {
    method public boolean dispatchUnhandledInputEvent(@NonNull android.view.InputEvent);
    method @Nullable public android.media.tv.interactive.TvInteractiveAppView.OnUnhandledInputEventListener getOnUnhandledInputEventListener();
    method public void notifyError(@NonNull String, @NonNull android.os.Bundle);
    method public void notifyRecordingStarted(@NonNull String);
    method public void notifyRecordingScheduled(@NonNull String, @Nullable String);
    method public void notifyRecordingStarted(@NonNull String, @Nullable String);
    method public void notifyRecordingStopped(@NonNull String);
    method public void notifyTimeShiftCurrentPositionChanged(@NonNull String, long);
    method public void notifyTimeShiftPlaybackParams(@NonNull android.media.PlaybackParams);
@@ -27807,8 +27816,10 @@ package android.media.tv.interactive {
    method public void onRequestCurrentChannelUri(@NonNull String);
    method public void onRequestCurrentTvInputId(@NonNull String);
    method public void onRequestCurrentVideoBounds(@NonNull String);
    method public void onRequestScheduleRecording(@NonNull String, @NonNull String, @NonNull String, @NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.os.Bundle);
    method public void onRequestScheduleRecording(@NonNull String, @NonNull String, @NonNull String, @NonNull android.net.Uri, long, long, int, @NonNull android.os.Bundle);
    method public void onRequestSigning(@NonNull String, @NonNull String, @NonNull String, @NonNull String, @NonNull byte[]);
    method public void onRequestStartRecording(@NonNull String, @Nullable android.net.Uri);
    method public void onRequestStartRecording(@NonNull String, @NonNull String, @Nullable android.net.Uri);
    method public void onRequestStopRecording(@NonNull String, @NonNull String);
    method public void onRequestStreamVolume(@NonNull String);
    method public void onRequestTimeShiftMode(@NonNull String);
+15 −5
Original line number Diff line number Diff line
@@ -78,18 +78,28 @@ public class TvRecordingClient {
     *
     * @param view The related {@link TvInteractiveAppView} instance that is linked to this TV
     *             recording client. {@code null} to unlink the view.
     * @param recordingId The ID of the recording which is assigned by applications. {@code null} is
     *                    valid only when the TvInteractiveAppView parameter is null.
     * @hide
     * @param recordingId The ID of the recording which is assigned by the TV application.
     *                    {@code null} if and only if the TvInteractiveAppView parameter is
     *                    {@code null}.
     * @throws IllegalArgumentException when recording ID is {@code null} and the
     *                                  TvInteractiveAppView is not {@code null}; or when recording
     *                                  ID is not {@code null} and the TvInteractiveAppView is
     *                                  {@code null}.
     * @see TvInteractiveAppView#notifyRecordingScheduled(String, String)
     * @see TvInteractiveAppView#notifyRecordingStarted(String, String)
     */
    public void setTvInteractiveAppView(
            @Nullable TvInteractiveAppView view, @Nullable String recordingId) {
        if (view != null && recordingId == null) {
            throw new IllegalArgumentException(
                    "null recordingId is allowed only when the view is null");
                    "null recordingId is not allowed only when the view is not null");
        }
        if (view == null && recordingId != null) {
            throw new IllegalArgumentException(
                    "recordingId should be null when the view is null");
        }
        mTvIAppView = view;
        mRecordingId = view == null ? null : recordingId;
        mRecordingId = recordingId;
    }

    /**
+5 −5
Original line number Diff line number Diff line
@@ -51,12 +51,12 @@ oneway interface ITvInteractiveAppClient {
    void onRequestCurrentTvInputId(int seq);
    void onRequestTimeShiftMode(int seq);
    void onRequestAvailableSpeeds(int seq);
    void onRequestStartRecording(in Uri programUri, int seq);
    void onRequestStartRecording(in String requestId, in Uri programUri, int seq);
    void onRequestStopRecording(in String recordingId, int seq);
    void onRequestScheduleRecording(in String inputId, in Uri channelUri, in Uri programUri,
            in Bundle params, int seq);
    void onRequestScheduleRecording2(in String inputId, in Uri channelUri, long start,
            long duration, int repeat, in Bundle params, int seq);
    void onRequestScheduleRecording(in String requestId, in String inputId, in Uri channelUri,
            in Uri programUri, in Bundle params, int seq);
    void onRequestScheduleRecording2(in String requestId, in String inputId, in Uri channelUri,
            long start, long duration, int repeat, in Bundle params, int seq);
    void onSetTvRecordingInfo(in String recordingId, in TvRecordingInfo recordingInfo, int seq);
    void onRequestTvRecordingInfo(in String recordingId, int seq);
    void onRequestTvRecordingInfoList(in int type, int seq);
+2 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ interface ITvInteractiveAppManager {
    void notifyContentAllowed(in IBinder sessionToken, int userId);
    void notifyContentBlocked(in IBinder sessionToken, in String rating, int userId);
    void notifySignalStrength(in IBinder sessionToken, int stength, int userId);
    void notifyRecordingStarted(in IBinder sessionToken, in String recordingId, int userId);
    void notifyRecordingStarted(in IBinder sessionToken, in String recordingId, String requestId,
            int userId);
    void notifyRecordingStopped(in IBinder sessionToken, in String recordingId, int userId);
    void notifyTvMessage(in IBinder sessionToken, in String type, in Bundle data, int userId);
    void setSurface(in IBinder sessionToken, in Surface surface, int userId);
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ oneway interface ITvInteractiveAppSession {
    void notifyContentAllowed();
    void notifyContentBlocked(in String rating);
    void notifySignalStrength(int strength);
    void notifyRecordingStarted(in String recordingId);
    void notifyRecordingStarted(in String recordingId, in String requestId);
    void notifyRecordingStopped(in String recordingId);
    void notifyTvMessage(in String type, in Bundle data);
    void setSurface(in Surface surface);
Loading