Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -16098,6 +16098,7 @@ package android.media.tv { public abstract class TvInputService.Session implements android.view.KeyEvent.Callback { ctor public TvInputService.Session(); method public void dispatchChannelRetuned(android.net.Uri); method public android.view.View onCreateOverlayView(); method public boolean onGenericMotionEvent(android.view.MotionEvent); method public boolean onKeyDown(int, android.view.KeyEvent); Loading Loading @@ -16135,6 +16136,7 @@ package android.media.tv { public static abstract class TvView.TvInputListener { ctor public TvView.TvInputListener(); method public void onChannelRetuned(java.lang.String, android.net.Uri); method public void onError(java.lang.String, int); } media/java/android/media/tv/ITvInputClient.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.media.tv; import android.content.ComponentName; import android.media.tv.ITvInputSession; import android.net.Uri; import android.os.Bundle; import android.view.InputChannel; Loading @@ -34,4 +35,5 @@ oneway interface ITvInputClient { void onVideoStreamChanged(int width, int height, boolean interlaced, int seq); void onAudioStreamChanged(int channelCount, int seq); void onClosedCaptionStreamChanged(boolean hasClosedCaption, int seq); void onChannelRetuned(in Uri channelUri, int seq); } media/java/android/media/tv/ITvInputSessionCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv; import android.media.tv.ITvInputSession; import android.net.Uri; import android.os.Bundle; /** Loading @@ -30,4 +31,5 @@ oneway interface ITvInputSessionCallback { void onVideoStreamChanged(int width, int height, boolean interlaced); void onAudioStreamChanged(int channelCount); void onClosedCaptionStreamChanged(boolean hasClosedCaption); void onChannelRetuned(in Uri channelUri); } media/java/android/media/tv/TvInputManager.java +31 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,16 @@ public final class TvInputManager { public void onClosedCaptionStreamChanged(Session session, boolean hasClosedCaption) { } /** * This is called when the channel of this session is changed by the underlying TV input * with out any {@link TvInputManager.Session#tune(Uri)} request. * * @param session A {@link TvInputManager.Session} associated with this callback * @param channelUri The URI of a channel. */ public void onChannelRetuned(Session session, Uri channelUri) { } /** * This is called when a custom event has been sent from this session. * Loading Loading @@ -194,6 +204,15 @@ public final class TvInputManager { }); } public void postChannelRetuned(final Uri channelUri) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onChannelRetuned(mSession, channelUri); } }); } public void postSessionEvent(final String eventType, final Bundle eventArgs) { mHandler.post(new Runnable() { @Override Loading Loading @@ -317,6 +336,18 @@ public final class TvInputManager { } } @Override public void onChannelRetuned(Uri channelUri, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postChannelRetuned(channelUri); } } @Override public void onSessionEvent(String eventType, Bundle eventArgs, int seq) { synchronized (mSessionCallbackRecordMap) { Loading media/java/android/media/tv/TvInputService.java +19 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,25 @@ public abstract class TvInputService extends Service { }); } /** * Notifies the channel of the session is retuned by TV input. * * @param channelUri The URI of a channel. */ public void dispatchChannelRetuned(final Uri channelUri) { mHandler.post(new Runnable() { @Override public void run() { try { if (DEBUG) Log.d(TAG, "dispatchChannelRetuned"); mSessionCallback.onChannelRetuned(channelUri); } catch (RemoteException e) { Log.w(TAG, "error in dispatchChannelRetuned"); } } }); } /** * Called when the session is released. */ Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -16098,6 +16098,7 @@ package android.media.tv { public abstract class TvInputService.Session implements android.view.KeyEvent.Callback { ctor public TvInputService.Session(); method public void dispatchChannelRetuned(android.net.Uri); method public android.view.View onCreateOverlayView(); method public boolean onGenericMotionEvent(android.view.MotionEvent); method public boolean onKeyDown(int, android.view.KeyEvent); Loading Loading @@ -16135,6 +16136,7 @@ package android.media.tv { public static abstract class TvView.TvInputListener { ctor public TvView.TvInputListener(); method public void onChannelRetuned(java.lang.String, android.net.Uri); method public void onError(java.lang.String, int); }
media/java/android/media/tv/ITvInputClient.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.media.tv; import android.content.ComponentName; import android.media.tv.ITvInputSession; import android.net.Uri; import android.os.Bundle; import android.view.InputChannel; Loading @@ -34,4 +35,5 @@ oneway interface ITvInputClient { void onVideoStreamChanged(int width, int height, boolean interlaced, int seq); void onAudioStreamChanged(int channelCount, int seq); void onClosedCaptionStreamChanged(boolean hasClosedCaption, int seq); void onChannelRetuned(in Uri channelUri, int seq); }
media/java/android/media/tv/ITvInputSessionCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv; import android.media.tv.ITvInputSession; import android.net.Uri; import android.os.Bundle; /** Loading @@ -30,4 +31,5 @@ oneway interface ITvInputSessionCallback { void onVideoStreamChanged(int width, int height, boolean interlaced); void onAudioStreamChanged(int channelCount); void onClosedCaptionStreamChanged(boolean hasClosedCaption); void onChannelRetuned(in Uri channelUri); }
media/java/android/media/tv/TvInputManager.java +31 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,16 @@ public final class TvInputManager { public void onClosedCaptionStreamChanged(Session session, boolean hasClosedCaption) { } /** * This is called when the channel of this session is changed by the underlying TV input * with out any {@link TvInputManager.Session#tune(Uri)} request. * * @param session A {@link TvInputManager.Session} associated with this callback * @param channelUri The URI of a channel. */ public void onChannelRetuned(Session session, Uri channelUri) { } /** * This is called when a custom event has been sent from this session. * Loading Loading @@ -194,6 +204,15 @@ public final class TvInputManager { }); } public void postChannelRetuned(final Uri channelUri) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onChannelRetuned(mSession, channelUri); } }); } public void postSessionEvent(final String eventType, final Bundle eventArgs) { mHandler.post(new Runnable() { @Override Loading Loading @@ -317,6 +336,18 @@ public final class TvInputManager { } } @Override public void onChannelRetuned(Uri channelUri, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postChannelRetuned(channelUri); } } @Override public void onSessionEvent(String eventType, Bundle eventArgs, int seq) { synchronized (mSessionCallbackRecordMap) { Loading
media/java/android/media/tv/TvInputService.java +19 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,25 @@ public abstract class TvInputService extends Service { }); } /** * Notifies the channel of the session is retuned by TV input. * * @param channelUri The URI of a channel. */ public void dispatchChannelRetuned(final Uri channelUri) { mHandler.post(new Runnable() { @Override public void run() { try { if (DEBUG) Log.d(TAG, "dispatchChannelRetuned"); mSessionCallback.onChannelRetuned(channelUri); } catch (RemoteException e) { Log.w(TAG, "error in dispatchChannelRetuned"); } } }); } /** * Called when the session is released. */ Loading