From c555dd01898cbc17cf1c8e98208e853b800057b4 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Mon, 17 Oct 2022 18:07:19 -0700 Subject: [PATCH] Unhide notifyRecordingStarted API Bug: 252888452 Test: atest Change-Id: Ie40b57389d3f1a03fe098cd17d07286f6bb029ab --- core/api/current.txt | 2 ++ .../media/tv/interactive/TvInteractiveAppManager.java | 2 +- .../media/tv/interactive/TvInteractiveAppService.java | 5 +++-- .../android/media/tv/interactive/TvInteractiveAppView.java | 6 ++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index 3410abffc11e9..6ab901944201c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -26518,6 +26518,7 @@ 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 abstract void onRelease(); method public void onResetInteractiveApp(); method public abstract boolean onSetSurface(@Nullable android.view.Surface); @@ -26575,6 +26576,7 @@ 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 onAttachedToWindow(); method public void onDetachedFromWindow(); method public void onLayout(boolean, int, int, int, int); diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppManager.java b/media/java/android/media/tv/interactive/TvInteractiveAppManager.java index a27fd10a69a60..7d84fb2c431fd 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppManager.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppManager.java @@ -1047,7 +1047,7 @@ public final class TvInteractiveAppManager { } } - void notifyRecordingStarted(@Nullable String recordingId) { + void notifyRecordingStarted(String recordingId) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppService.java b/media/java/android/media/tv/interactive/TvInteractiveAppService.java index 236b3dad3e997..2956a0a93e419 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppService.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppService.java @@ -456,9 +456,10 @@ public abstract class TvInteractiveAppService extends Service { /** * Receives started recording's ID. - * @hide + * + * @param recordingId The ID of the recording started */ - public void onRecordingStarted(@Nullable String recordingId) { + public void onRecordingStarted(@NonNull String recordingId) { } /** diff --git a/media/java/android/media/tv/interactive/TvInteractiveAppView.java b/media/java/android/media/tv/interactive/TvInteractiveAppView.java index 84a6b886cd219..1f270d0ba7681 100755 --- a/media/java/android/media/tv/interactive/TvInteractiveAppView.java +++ b/media/java/android/media/tv/interactive/TvInteractiveAppView.java @@ -583,11 +583,9 @@ public class TvInteractiveAppView extends ViewGroup { /** * Alerts the TV interactive app that a recording has been started with recordingId * - * @param recordingId The Id of the recording started - * - * @hide + * @param recordingId The ID of the recording started */ - public void notifyRecordingStarted(@Nullable String recordingId) { + public void notifyRecordingStarted(@NonNull String recordingId) { if (DEBUG) { Log.d(TAG, "notifyRecordingStarted"); }