13957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo/*
23957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Copyright (C) 2014 The Android Open Source Project
33957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
43957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Licensed under the Apache License, Version 2.0 (the "License");
53957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * you may not use this file except in compliance with the License.
63957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * You may obtain a copy of the License at
73957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
83957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *      http://www.apache.org/licenses/LICENSE-2.0
93957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
103957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Unless required by applicable law or agreed to in writing, software
113957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * distributed under the License is distributed on an "AS IS" BASIS,
123957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * See the License for the specific language governing permissions and
143957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * limitations under the License.
153957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo */
163957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
17d5cc4a281e7ce29d1e8687ff3394b57a3a549260Jae Seopackage android.media.tv;
183957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
199a22f0f0a631849d9c622c642d3ab0395f77584bYoungsang Choimport android.graphics.Rect;
201f213914c45c23c653f721690da2ce0718e63139Dongwon Kangimport android.media.tv.TvTrackInfo;
213957091ba8f08c02b5e781098cb955a5f697a1ffJae Seoimport android.net.Uri;
22a759b111a1c9cb00284038f8a1554bf29709b952Jae Seoimport android.os.Bundle;
233957091ba8f08c02b5e781098cb955a5f697a1ffJae Seoimport android.view.Surface;
243957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
253957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo/**
263957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Sub-interface of ITvInputService which is created per session and has its own context.
273957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * @hide
283957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo */
293957091ba8f08c02b5e781098cb955a5f697a1ffJae Seooneway interface ITvInputSession {
303957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo    void release();
313957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
3215c56aac985bc8d75f38fb4ecb92dda12d2ca06cJi-Hwan Lee    void setMain(boolean isMain);
333957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo    void setSurface(in Surface surface);
34e821d711db1799dc51661a3ed6188f3cd942bae7Youngsang Cho    void dispatchSurfaceChanged(int format, int width, int height);
353957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo    // TODO: Remove this once it becomes irrelevant for applications to handle audio focus. The plan
363957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo    // is to introduce some new concepts that will solve a number of problems in audio policy today.
373957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo    void setVolume(float volume);
381a6b25eabcc1fb66e6e8d76f91fd413e18b793a9Sungsoo Lim    void tune(in Uri channelUri, in Bundle params);
392c1c31c7ae9bd972b974a5cc2d8b0942746af612Jae Seo    void setCaptionEnabled(boolean enabled);
4010d285ac06b3d3060c7d90d3dc196d4ac8367467Jae Seo    void selectTrack(int type, in String trackId);
419a22f0f0a631849d9c622c642d3ab0395f77584bYoungsang Cho
42a759b111a1c9cb00284038f8a1554bf29709b952Jae Seo    void appPrivateCommand(in String action, in Bundle data);
43a759b111a1c9cb00284038f8a1554bf29709b952Jae Seo
449a22f0f0a631849d9c622c642d3ab0395f77584bYoungsang Cho    void createOverlayView(in IBinder windowToken, in Rect frame);
459a22f0f0a631849d9c622c642d3ab0395f77584bYoungsang Cho    void relayoutOverlayView(in Rect frame);
469a22f0f0a631849d9c622c642d3ab0395f77584bYoungsang Cho    void removeOverlayView();
47903d6b72cd572665309633e925485464d08bb25aJaewan Kim
489bf671f8ee72b156f16fcf05a3d1c6e093ecba67Sungsoo Lim    void requestUnblockContent(in String unblockedRating);
493957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo}
50