1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.media.tv.interactive; 18 19 import android.graphics.Rect; 20 import android.media.tv.BroadcastInfoResponse; 21 import android.net.Uri; 22 import android.media.tv.AdResponse; 23 import android.media.tv.BroadcastInfoResponse; 24 import android.media.tv.TvTrackInfo; 25 import android.os.Bundle; 26 import android.view.Surface; 27 28 /** 29 * Sub-interface of ITvInteractiveAppService.aidl which is created per session and has its own 30 * context. 31 * @hide 32 */ 33 oneway interface ITvInteractiveAppSession { startInteractiveApp()34 void startInteractiveApp(); stopInteractiveApp()35 void stopInteractiveApp(); resetInteractiveApp()36 void resetInteractiveApp(); createBiInteractiveApp(in Uri biIAppUri, in Bundle params)37 void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); destroyBiInteractiveApp(in String biIAppId)38 void destroyBiInteractiveApp(in String biIAppId); setTeletextAppEnabled(boolean enable)39 void setTeletextAppEnabled(boolean enable); sendCurrentChannelUri(in Uri channelUri)40 void sendCurrentChannelUri(in Uri channelUri); sendCurrentChannelLcn(int lcn)41 void sendCurrentChannelLcn(int lcn); sendStreamVolume(float volume)42 void sendStreamVolume(float volume); sendTrackInfoList(in List<TvTrackInfo> tracks)43 void sendTrackInfoList(in List<TvTrackInfo> tracks); sendCurrentTvInputId(in String inputId)44 void sendCurrentTvInputId(in String inputId); sendSigningResult(in String signingId, in byte[] result)45 void sendSigningResult(in String signingId, in byte[] result); notifyError(in String errMsg, in Bundle params)46 void notifyError(in String errMsg, in Bundle params); release()47 void release(); notifyTuned(in Uri channelUri)48 void notifyTuned(in Uri channelUri); notifyTrackSelected(int type, in String trackId)49 void notifyTrackSelected(int type, in String trackId); notifyTracksChanged(in List<TvTrackInfo> tracks)50 void notifyTracksChanged(in List<TvTrackInfo> tracks); notifyVideoAvailable()51 void notifyVideoAvailable(); notifyVideoUnavailable(int reason)52 void notifyVideoUnavailable(int reason); notifyContentAllowed()53 void notifyContentAllowed(); notifyContentBlocked(in String rating)54 void notifyContentBlocked(in String rating); notifySignalStrength(int strength)55 void notifySignalStrength(int strength); setSurface(in Surface surface)56 void setSurface(in Surface surface); dispatchSurfaceChanged(int format, int width, int height)57 void dispatchSurfaceChanged(int format, int width, int height); notifyBroadcastInfoResponse(in BroadcastInfoResponse response)58 void notifyBroadcastInfoResponse(in BroadcastInfoResponse response); notifyAdResponse(in AdResponse response)59 void notifyAdResponse(in AdResponse response); 60 createMediaView(in IBinder windowToken, in Rect frame)61 void createMediaView(in IBinder windowToken, in Rect frame); relayoutMediaView(in Rect frame)62 void relayoutMediaView(in Rect frame); removeMediaView()63 void removeMediaView(); 64 } 65