From 841ad718c141852e4119ee0fd787b85404cef015 Mon Sep 17 00:00:00 2001 From: Dongwon Kang Date: Thu, 17 Mar 2016 10:57:34 -0700 Subject: [PATCH] TIF: Remove TvInputManager.Session from system API Originally this API is expected to be used some use cases which don't fit TvView well. e.g. background recording. Removing this from system api in favor of TvRecodingClient which is introduced in N. Bug: 25726241 Change-Id: If45fc3e2c5382e7b9e8abf42effebd76fd84b25d --- api/system-current.txt | 35 ------------------- .../java/android/media/tv/TvInputManager.java | 14 -------- 2 files changed, 49 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 344343f24a0cc..0887d9bc15e53 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -24709,8 +24709,6 @@ package android.media.tv { method public android.media.tv.TvInputManager.Hardware acquireTvInputHardware(int, android.media.tv.TvInputManager.HardwareCallback, android.media.tv.TvInputInfo); method public void addBlockedRating(android.media.tv.TvContentRating); method public boolean captureFrame(java.lang.String, android.view.Surface, android.media.tv.TvStreamConfig); - method public void createRecordingSession(java.lang.String, android.media.tv.TvInputManager.SessionCallback, android.os.Handler); - method public void createSession(java.lang.String, android.media.tv.TvInputManager.SessionCallback, android.os.Handler); method public java.util.List getAvailableTvStreamConfigList(java.lang.String); method public java.util.List getBlockedRatings(); method public java.util.List getHardwareList(); @@ -24762,39 +24760,6 @@ package android.media.tv { method public abstract void onStreamConfigChanged(android.media.tv.TvStreamConfig[]); } - public static final class TvInputManager.Session { - method public void dispatchSurfaceChanged(int, int, int); - method public java.lang.String getSelectedTrack(int); - method public java.util.List getTracks(int); - method public void release(); - method public void selectTrack(int, java.lang.String); - method public void sendAppPrivateCommand(java.lang.String, android.os.Bundle); - method public void setCaptionEnabled(boolean); - method public void setStreamVolume(float); - method public void setSurface(android.view.Surface); - method public void tune(android.net.Uri); - method public void tune(android.net.Uri, android.os.Bundle); - } - - public static abstract class TvInputManager.SessionCallback { - ctor public TvInputManager.SessionCallback(); - method public void onChannelRetuned(android.media.tv.TvInputManager.Session, android.net.Uri); - method public void onContentAllowed(android.media.tv.TvInputManager.Session); - method public void onContentBlocked(android.media.tv.TvInputManager.Session, android.media.tv.TvContentRating); - method public void onLayoutSurface(android.media.tv.TvInputManager.Session, int, int, int, int); - method public void onSessionCreated(android.media.tv.TvInputManager.Session); - method public void onSessionEvent(android.media.tv.TvInputManager.Session, java.lang.String, android.os.Bundle); - method public void onSessionReleased(android.media.tv.TvInputManager.Session); - method public void onTimeShiftCurrentPositionChanged(android.media.tv.TvInputManager.Session, long); - method public void onTimeShiftStartPositionChanged(android.media.tv.TvInputManager.Session, long); - method public void onTimeShiftStatusChanged(android.media.tv.TvInputManager.Session, int); - method public void onTrackSelected(android.media.tv.TvInputManager.Session, int, java.lang.String); - method public void onTracksChanged(android.media.tv.TvInputManager.Session, java.util.List); - method public void onVideoAvailable(android.media.tv.TvInputManager.Session); - method public void onVideoSizeChanged(android.media.tv.TvInputManager.Session, int, int); - method public void onVideoUnavailable(android.media.tv.TvInputManager.Session, int); - } - public static abstract class TvInputManager.TvInputCallback { ctor public TvInputManager.TvInputCallback(); method public void onInputAdded(java.lang.String); diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java index 89e45772981c3..3eb335940d8ed 100644 --- a/media/java/android/media/tv/TvInputManager.java +++ b/media/java/android/media/tv/TvInputManager.java @@ -302,7 +302,6 @@ public final class TvInputManager { * Interface used to receive the created session. * @hide */ - @SystemApi public abstract static class SessionCallback { /** * This is called after {@link TvInputManager#createSession} has been processed. @@ -418,9 +417,7 @@ public final class TvInputManager { * @param top Top position. * @param right Right position. * @param bottom Bottom position. - * @hide */ - @SystemApi public void onLayoutSurface(Session session, int left, int top, int right, int bottom) { } @@ -430,9 +427,7 @@ public final class TvInputManager { * @param session A {@link TvInputManager.Session} associated with this callback * @param eventType The type of the event. * @param eventArgs Optional arguments of the event. - * @hide */ - @SystemApi public void onSessionEvent(Session session, String eventType, Bundle eventArgs) { } @@ -1347,7 +1342,6 @@ public final class TvInputManager { * @param handler A {@link Handler} that the session creation will be delivered to. * @hide */ - @SystemApi public void createSession(@NonNull String inputId, @NonNull final SessionCallback callback, @NonNull Handler handler) { createSessionInternal(inputId, false, callback, handler); @@ -1364,7 +1358,6 @@ public final class TvInputManager { * @param handler A {@link Handler} that the session creation will be delivered to. * @hide */ - @SystemApi public void createRecordingSession(@NonNull String inputId, @NonNull final SessionCallback callback, @NonNull Handler handler) { createSessionInternal(inputId, true, callback, handler); @@ -1544,7 +1537,6 @@ public final class TvInputManager { * The Session provides the per-session functionality of TV inputs. * @hide */ - @SystemApi public static final class Session { static final int DISPATCH_IN_PROGRESS = -1; static final int DISPATCH_NOT_HANDLED = 0; @@ -1656,9 +1648,7 @@ public final class TvInputManager { * @param format The new PixelFormat of the surface. * @param width The new width of the surface. * @param height The new height of the surface. - * @hide */ - @SystemApi public void dispatchSurfaceChanged(int format, int width, int height) { if (mToken == null) { Log.w(TAG, "The session has been already released"); @@ -1706,9 +1696,7 @@ public final class TvInputManager { * * @param channelUri The URI of a channel. * @param params A set of extra parameters which might be handled with this tune event. - * @hide */ - @SystemApi public void tune(@NonNull Uri channelUri, Bundle params) { Preconditions.checkNotNull(channelUri); if (mToken == null) { @@ -2065,9 +2053,7 @@ public final class TvInputManager { * i.e. prefixed with a package name you own, so that different developers will * not create conflicting commands. * @param data Any data to include with the command. - * @hide */ - @SystemApi public void sendAppPrivateCommand(String action, Bundle data) { if (mToken == null) { Log.w(TAG, "The session has been already released");