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

Commit 2dc6cc9a authored by Jiabin Huang's avatar Jiabin Huang Committed by Android (Google) Code Review
Browse files

Merge "TIF: Unhide TvRecordingClient.tune(String, Uri, Bundle)" into nyc-dev

parents 966f1c93 d48d029d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23053,6 +23053,7 @@ package android.media.tv {
    method public abstract void onStartRecording(android.net.Uri);
    method public abstract void onStopRecording();
    method public abstract void onTune(android.net.Uri);
    method public void onTune(android.net.Uri, android.os.Bundle);
  }
  public static abstract class TvInputService.Session implements android.view.KeyEvent.Callback {
@@ -23102,6 +23103,7 @@ package android.media.tv {
    method public void startRecording(android.net.Uri);
    method public void stopRecording();
    method public void tune(java.lang.String, android.net.Uri);
    method public void tune(java.lang.String, android.net.Uri, android.os.Bundle);
  }
  public static abstract class TvRecordingClient.RecordingCallback {
+2 −0
Original line number Diff line number Diff line
@@ -23118,6 +23118,7 @@ package android.media.tv {
    method public abstract void onStartRecording(android.net.Uri);
    method public abstract void onStopRecording();
    method public abstract void onTune(android.net.Uri);
    method public void onTune(android.net.Uri, android.os.Bundle);
  }
  public static abstract class TvInputService.Session implements android.view.KeyEvent.Callback {
@@ -23167,6 +23168,7 @@ package android.media.tv {
    method public void startRecording(android.net.Uri);
    method public void stopRecording();
    method public void tune(java.lang.String, android.net.Uri);
    method public void tune(java.lang.String, android.net.Uri, android.os.Bundle);
  }
  public static abstract class TvRecordingClient.RecordingCallback {
+6 −5
Original line number Diff line number Diff line
@@ -1689,19 +1689,20 @@ public abstract class TvInputService extends Service {
        public abstract void onTune(Uri channelUri);

        /**
         * Called when the application requests to tune to a given channel for TV program recording.
         * Calls {@link #onTune(Uri)}. Override this method in order to handle domain-specific
         * features that are only known between certain TV inputs and their clients.
         *
         * <p>The application may call this method before starting or after stopping recording, but
         * not during recording.
         *
         * <p>The session must call {@link #notifyTuned()} if the tune request was fulfilled, or
         * <p>The session must call {@link #notifyTuned(Uri)} if the tune request was fulfilled, or
         * {@link #notifyError(int)} otherwise.
         *
         * @param channelUri The URI of a channel.
         * @param params Extra parameters.
         * @hide
         * @param params Domain-specific data for this tune request. Keys <em>must</em> be a scoped
         *            name, i.e. prefixed with a package name you own, so that different developers
         *            will not create conflicting keys.
         */
        @SystemApi
        public void onTune(Uri channelUri, Bundle params) {
            onTune(channelUri);
        }
+6 −5
Original line number Diff line number Diff line
@@ -91,22 +91,23 @@ public class TvRecordingClient {
     * Tunes to a given channel for TV program recording. The first tune request will create a new
     * recording session for the corresponding TV input and establish a connection between the
     * application and the session. If recording has already started in the current recording
     * session, this method throws an exception.
     * session, this method throws an exception. This can be used to provide domain-specific
     * features that are only known between certain client and their TV inputs.
     *
     * <p>The application may call this method before starting or after stopping recording, but not
     * during recording.
     *
     * <p>The recording session will respond by calling
     * {@link RecordingCallback#onTuned()} if the tune request was fulfilled, or
     * {@link RecordingCallback#onTuned(Uri)} if the tune request was fulfilled, or
     * {@link RecordingCallback#onError(int)} otherwise.
     *
     * @param inputId The ID of the TV input for the given channel.
     * @param channelUri The URI of a channel.
     * @param params Extra parameters.
     * @param params Domain-specific data for this tune request. Keys <em>must</em> be a scoped
     *            name, i.e. prefixed with a package name you own, so that different developers will
     *            not create conflicting keys.
     * @throws IllegalStateException If recording is already started.
     * @hide
     */
    @SystemApi
    public void tune(String inputId, Uri channelUri, Bundle params) {
        if (DEBUG) Log.d(TAG, "tune(" + channelUri + ")");
        if (TextUtils.isEmpty(inputId)) {