Loading media/java/android/media/tv/ITvInputManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ interface ITvInputManager { void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, int userId); void setVolume(in IBinder sessionToken, float volume, int userId); void tune(in IBinder sessionToken, in Uri channelUri, int userId); void tune(in IBinder sessionToken, in Uri channelUri, in Bundle params, int userId); void setCaptionEnabled(in IBinder sessionToken, boolean enabled, int userId); void selectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); void unselectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); Loading media/java/android/media/tv/ITvInputSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ oneway interface ITvInputSession { // TODO: Remove this once it becomes irrelevant for applications to handle audio focus. The plan // is to introduce some new concepts that will solve a number of problems in audio policy today. void setVolume(float volume); void tune(in Uri channelUri); void tune(in Uri channelUri, in Bundle params); void setCaptionEnabled(boolean enabled); void selectTrack(in TvTrackInfo track); void unselectTrack(in TvTrackInfo track); Loading media/java/android/media/tv/ITvInputSessionWrapper.java +5 −3 Original line number Diff line number Diff line Loading @@ -111,7 +111,9 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand return; } case DO_TUNE: { mTvInputSessionImpl.tune((Uri) msg.obj); SomeArgs args = (SomeArgs) msg.obj; mTvInputSessionImpl.tune((Uri) args.arg1, (Bundle) args.arg2); args.recycle(); return; } case DO_SET_CAPTION_ENABLED: { Loading Loading @@ -184,8 +186,8 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand } @Override public void tune(Uri channelUri) { mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_TUNE, channelUri)); public void tune(Uri channelUri, Bundle params) { mCaller.executeOrSendMessage(mCaller.obtainMessageOO(DO_TUNE, channelUri, params)); } @Override Loading media/java/android/media/tv/TvContract.java +18 −8 Original line number Diff line number Diff line Loading @@ -509,7 +509,7 @@ public final class TvContract { * The ID of the TV input service that provides this TV channel. * <p> * Use {@link #buildInputId} to build the ID. * <p> * </p><p> * This is a required field. * </p><p> * Type: TEXT Loading Loading @@ -662,7 +662,7 @@ public final class TvContract { * {@link Programs#COLUMN_VIDEO_HEIGHT} to get more accurate video resolution. * </p><p> * Type: TEXT * </p><p> * </p> * @see #getVideoResolution */ public static final String COLUMN_VIDEO_FORMAT = "video_format"; Loading @@ -688,8 +688,7 @@ public final class TvContract { * the channel is searchable and can be included in search results, a value of 0 indicates * the channel and its TV programs are hidden from search. If not specified, this value is * set to 1 (searchable) by default. * </p> * <p> * </p><p> * Type: INTEGER (boolean) * </p> */ Loading Loading @@ -743,14 +742,12 @@ public final class TvContract { * To access this directory, append {@link Channels.Logo#CONTENT_DIRECTORY} to the raw * channel URI. The resulting URI represents an image file, and should be interacted * using ContentResolver.openAssetFileDescriptor. * </p> * <p> * </p><p> * Note that this sub-directory also supports opening the logo as an asset file in write * mode. Callers can create or replace the primary logo associated with this channel by * opening the asset file and writing the full-size photo contents into it. When the file * is closed, the image will be parsed, sized down if necessary, and stored. * </p> * <p> * </p><p> * Usage example: * <pre> * public void writeChannelLogo(long channelId, byte[] logo) { Loading Loading @@ -1180,6 +1177,19 @@ public final class TvContract { */ public static final String COLUMN_DESCRIPTION = "description"; /** * Extra parameters of the tune operation. * <p> * This column contains an encoded string which is comma-separated key-value pairs. * (Ex. "[key1]=[value1], [key2]=[value2]"). COLUMN_TUNE_PARAMS will use '%' as an escape * character for the characters of '%', '=', and ','. * </p><p> * Type: TEXT * </p> * @see TvInputManager.Session.tune(Uri, Bundle) */ public static final String COLUMN_TUNE_PARAMS = "tune_params"; private WatchedPrograms() {} } } media/java/android/media/tv/TvInputManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -1012,6 +1012,19 @@ public final class TvInputManager { * @throws IllegalArgumentException if the argument is {@code null}. */ public void tune(Uri channelUri) { tune(channelUri, null); } /** * Tunes to a given channel. * * @param channelUri The URI of a channel. * @param params A set of extra parameters which might be handled with this tune event. * @throws IllegalArgumentException if {@code channelUri} is {@code null}. * @hide */ @SystemApi public void tune(Uri channelUri, Bundle params) { if (channelUri == null) { throw new IllegalArgumentException("channelUri cannot be null"); } Loading @@ -1021,7 +1034,7 @@ public final class TvInputManager { } mTracks = null; try { mService.tune(mToken, channelUri, mUserId); mService.tune(mToken, channelUri, params, mUserId); } catch (RemoteException e) { throw new RuntimeException(e); } Loading Loading
media/java/android/media/tv/ITvInputManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ interface ITvInputManager { void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height, int userId); void setVolume(in IBinder sessionToken, float volume, int userId); void tune(in IBinder sessionToken, in Uri channelUri, int userId); void tune(in IBinder sessionToken, in Uri channelUri, in Bundle params, int userId); void setCaptionEnabled(in IBinder sessionToken, boolean enabled, int userId); void selectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); void unselectTrack(in IBinder sessionToken, in TvTrackInfo track, int userId); Loading
media/java/android/media/tv/ITvInputSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ oneway interface ITvInputSession { // TODO: Remove this once it becomes irrelevant for applications to handle audio focus. The plan // is to introduce some new concepts that will solve a number of problems in audio policy today. void setVolume(float volume); void tune(in Uri channelUri); void tune(in Uri channelUri, in Bundle params); void setCaptionEnabled(boolean enabled); void selectTrack(in TvTrackInfo track); void unselectTrack(in TvTrackInfo track); Loading
media/java/android/media/tv/ITvInputSessionWrapper.java +5 −3 Original line number Diff line number Diff line Loading @@ -111,7 +111,9 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand return; } case DO_TUNE: { mTvInputSessionImpl.tune((Uri) msg.obj); SomeArgs args = (SomeArgs) msg.obj; mTvInputSessionImpl.tune((Uri) args.arg1, (Bundle) args.arg2); args.recycle(); return; } case DO_SET_CAPTION_ENABLED: { Loading Loading @@ -184,8 +186,8 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand } @Override public void tune(Uri channelUri) { mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_TUNE, channelUri)); public void tune(Uri channelUri, Bundle params) { mCaller.executeOrSendMessage(mCaller.obtainMessageOO(DO_TUNE, channelUri, params)); } @Override Loading
media/java/android/media/tv/TvContract.java +18 −8 Original line number Diff line number Diff line Loading @@ -509,7 +509,7 @@ public final class TvContract { * The ID of the TV input service that provides this TV channel. * <p> * Use {@link #buildInputId} to build the ID. * <p> * </p><p> * This is a required field. * </p><p> * Type: TEXT Loading Loading @@ -662,7 +662,7 @@ public final class TvContract { * {@link Programs#COLUMN_VIDEO_HEIGHT} to get more accurate video resolution. * </p><p> * Type: TEXT * </p><p> * </p> * @see #getVideoResolution */ public static final String COLUMN_VIDEO_FORMAT = "video_format"; Loading @@ -688,8 +688,7 @@ public final class TvContract { * the channel is searchable and can be included in search results, a value of 0 indicates * the channel and its TV programs are hidden from search. If not specified, this value is * set to 1 (searchable) by default. * </p> * <p> * </p><p> * Type: INTEGER (boolean) * </p> */ Loading Loading @@ -743,14 +742,12 @@ public final class TvContract { * To access this directory, append {@link Channels.Logo#CONTENT_DIRECTORY} to the raw * channel URI. The resulting URI represents an image file, and should be interacted * using ContentResolver.openAssetFileDescriptor. * </p> * <p> * </p><p> * Note that this sub-directory also supports opening the logo as an asset file in write * mode. Callers can create or replace the primary logo associated with this channel by * opening the asset file and writing the full-size photo contents into it. When the file * is closed, the image will be parsed, sized down if necessary, and stored. * </p> * <p> * </p><p> * Usage example: * <pre> * public void writeChannelLogo(long channelId, byte[] logo) { Loading Loading @@ -1180,6 +1177,19 @@ public final class TvContract { */ public static final String COLUMN_DESCRIPTION = "description"; /** * Extra parameters of the tune operation. * <p> * This column contains an encoded string which is comma-separated key-value pairs. * (Ex. "[key1]=[value1], [key2]=[value2]"). COLUMN_TUNE_PARAMS will use '%' as an escape * character for the characters of '%', '=', and ','. * </p><p> * Type: TEXT * </p> * @see TvInputManager.Session.tune(Uri, Bundle) */ public static final String COLUMN_TUNE_PARAMS = "tune_params"; private WatchedPrograms() {} } }
media/java/android/media/tv/TvInputManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -1012,6 +1012,19 @@ public final class TvInputManager { * @throws IllegalArgumentException if the argument is {@code null}. */ public void tune(Uri channelUri) { tune(channelUri, null); } /** * Tunes to a given channel. * * @param channelUri The URI of a channel. * @param params A set of extra parameters which might be handled with this tune event. * @throws IllegalArgumentException if {@code channelUri} is {@code null}. * @hide */ @SystemApi public void tune(Uri channelUri, Bundle params) { if (channelUri == null) { throw new IllegalArgumentException("channelUri cannot be null"); } Loading @@ -1021,7 +1034,7 @@ public final class TvInputManager { } mTracks = null; try { mService.tune(mToken, channelUri, mUserId); mService.tune(mToken, channelUri, params, mUserId); } catch (RemoteException e) { throw new RuntimeException(e); } Loading