Loading media/java/android/media/tv/interactive/ITvIAppClient.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv.interactive; import android.media.tv.BroadcastInfoRequest; import android.net.Uri; import android.os.Bundle; import android.view.InputChannel; Loading @@ -31,5 +32,6 @@ oneway interface ITvIAppClient { void onLayoutSurface(int left, int top, int right, int bottom, int seq); void onBroadcastInfoRequest(in BroadcastInfoRequest request, int seq); void onSessionStateChanged(int state, int seq); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq); void onCommandRequest(in String cmdType, in Bundle parameters, int seq); } media/java/android/media/tv/interactive/ITvIAppManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ interface ITvIAppManager { void notifyAppLinkInfo(String tiasId, in Bundle info, int userId); void sendAppLinkCommand(String tiasId, in Bundle command, int userId); void startIApp(in IBinder sessionToken, int userId); void createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId); void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId); void createSession( in ITvIAppClient client, in String iAppServiceId, int type, int seq, int userId); void releaseSession(in IBinder sessionToken, int userId); Loading media/java/android/media/tv/interactive/ITvIAppSession.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -17,10 +17,10 @@ package android.media.tv.interactive; import android.graphics.Rect; import android.net.Uri; import android.media.tv.BroadcastInfoResponse; import android.net.Uri; import android.os.Bundle; import android.view.Surface; import android.media.tv.BroadcastInfoResponse; /** * Sub-interface of ITvIAppService.aidl which is created per session and has its own context. Loading @@ -28,6 +28,8 @@ import android.media.tv.BroadcastInfoResponse; */ oneway interface ITvIAppSession { void startIApp(); void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); void destroyBiInteractiveApp(in String biIAppId); void release(); void notifyTuned(in Uri channelUri); void setSurface(in Surface surface); Loading media/java/android/media/tv/interactive/ITvIAppSessionCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.media.tv.interactive; import android.media.tv.BroadcastInfoRequest; import android.media.tv.interactive.ITvIAppSession; import android.media.tv.BroadcastInfoRequest; import android.net.Uri; import android.os.Bundle; /** Loading @@ -31,5 +32,6 @@ oneway interface ITvIAppSessionCallback { void onLayoutSurface(int left, int top, int right, int bottom); void onBroadcastInfoRequest(in BroadcastInfoRequest request); void onSessionStateChanged(int state); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); void onCommandRequest(in String cmdType, in Bundle parameters); } media/java/android/media/tv/interactive/TvIAppManager.java +58 −1 Original line number Diff line number Diff line Loading @@ -267,6 +267,18 @@ public final class TvIAppManager { record.postSessionStateChanged(state); } } @Override public void onBiInteractiveAppCreated(Uri biIAppUri, String biIAppId, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postBiInteractiveAppCreated(biIAppUri, biIAppId); } } }; ITvIAppManagerCallback managerCallback = new ITvIAppManagerCallback.Stub() { @Override Loading Loading @@ -375,7 +387,6 @@ public final class TvIAppManager { public void onTvIAppInfoUpdated(@NonNull TvIAppInfo iAppInfo) { } /** * This is called when the state of the interactive app service is changed. * @hide Loading Loading @@ -623,6 +634,30 @@ public final class TvIAppManager { } } void createBiInteractiveApp(Uri biIAppUri, Bundle params) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.createBiInteractiveApp(mToken, biIAppUri, params, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } void destroyBiInteractiveApp(String biIAppId) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.destroyBiInteractiveApp(mToken, biIAppId, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Sets the {@link android.view.Surface} for this session. * Loading Loading @@ -1078,6 +1113,15 @@ public final class TvIAppManager { } }); } void postBiInteractiveAppCreated(Uri biIAppUri, String biIAppId) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onBiInteractiveAppCreated(mSession, biIAppUri, biIAppId); } }); } } /** Loading Loading @@ -1135,5 +1179,18 @@ public final class TvIAppManager { */ public void onSessionStateChanged(Session session, int state) { } /** * This is called when {@link TvIAppService.Session#notifyBiInteractiveAppCreated} is * called. * * @param session A {@link TvIAppManager.Session} associated with this callback. * @param biIAppUri URI associated this BI interactive app. This is the same URI in * {@link Session#createBiInteractiveApp(Uri, Bundle)} * @param biIAppId BI interactive app ID, which can be used to destroy the BI interactive * app. */ public void onBiInteractiveAppCreated(Session session, Uri biIAppUri, String biIAppId) { } } } Loading
media/java/android/media/tv/interactive/ITvIAppClient.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv.interactive; import android.media.tv.BroadcastInfoRequest; import android.net.Uri; import android.os.Bundle; import android.view.InputChannel; Loading @@ -31,5 +32,6 @@ oneway interface ITvIAppClient { void onLayoutSurface(int left, int top, int right, int bottom, int seq); void onBroadcastInfoRequest(in BroadcastInfoRequest request, int seq); void onSessionStateChanged(int state, int seq); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq); void onCommandRequest(in String cmdType, in Bundle parameters, int seq); }
media/java/android/media/tv/interactive/ITvIAppManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ interface ITvIAppManager { void notifyAppLinkInfo(String tiasId, in Bundle info, int userId); void sendAppLinkCommand(String tiasId, in Bundle command, int userId); void startIApp(in IBinder sessionToken, int userId); void createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId); void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId); void createSession( in ITvIAppClient client, in String iAppServiceId, int type, int seq, int userId); void releaseSession(in IBinder sessionToken, int userId); Loading
media/java/android/media/tv/interactive/ITvIAppSession.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -17,10 +17,10 @@ package android.media.tv.interactive; import android.graphics.Rect; import android.net.Uri; import android.media.tv.BroadcastInfoResponse; import android.net.Uri; import android.os.Bundle; import android.view.Surface; import android.media.tv.BroadcastInfoResponse; /** * Sub-interface of ITvIAppService.aidl which is created per session and has its own context. Loading @@ -28,6 +28,8 @@ import android.media.tv.BroadcastInfoResponse; */ oneway interface ITvIAppSession { void startIApp(); void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); void destroyBiInteractiveApp(in String biIAppId); void release(); void notifyTuned(in Uri channelUri); void setSurface(in Surface surface); Loading
media/java/android/media/tv/interactive/ITvIAppSessionCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.media.tv.interactive; import android.media.tv.BroadcastInfoRequest; import android.media.tv.interactive.ITvIAppSession; import android.media.tv.BroadcastInfoRequest; import android.net.Uri; import android.os.Bundle; /** Loading @@ -31,5 +32,6 @@ oneway interface ITvIAppSessionCallback { void onLayoutSurface(int left, int top, int right, int bottom); void onBroadcastInfoRequest(in BroadcastInfoRequest request); void onSessionStateChanged(int state); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); void onCommandRequest(in String cmdType, in Bundle parameters); }
media/java/android/media/tv/interactive/TvIAppManager.java +58 −1 Original line number Diff line number Diff line Loading @@ -267,6 +267,18 @@ public final class TvIAppManager { record.postSessionStateChanged(state); } } @Override public void onBiInteractiveAppCreated(Uri biIAppUri, String biIAppId, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postBiInteractiveAppCreated(biIAppUri, biIAppId); } } }; ITvIAppManagerCallback managerCallback = new ITvIAppManagerCallback.Stub() { @Override Loading Loading @@ -375,7 +387,6 @@ public final class TvIAppManager { public void onTvIAppInfoUpdated(@NonNull TvIAppInfo iAppInfo) { } /** * This is called when the state of the interactive app service is changed. * @hide Loading Loading @@ -623,6 +634,30 @@ public final class TvIAppManager { } } void createBiInteractiveApp(Uri biIAppUri, Bundle params) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.createBiInteractiveApp(mToken, biIAppUri, params, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } void destroyBiInteractiveApp(String biIAppId) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.destroyBiInteractiveApp(mToken, biIAppId, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Sets the {@link android.view.Surface} for this session. * Loading Loading @@ -1078,6 +1113,15 @@ public final class TvIAppManager { } }); } void postBiInteractiveAppCreated(Uri biIAppUri, String biIAppId) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onBiInteractiveAppCreated(mSession, biIAppUri, biIAppId); } }); } } /** Loading Loading @@ -1135,5 +1179,18 @@ public final class TvIAppManager { */ public void onSessionStateChanged(Session session, int state) { } /** * This is called when {@link TvIAppService.Session#notifyBiInteractiveAppCreated} is * called. * * @param session A {@link TvIAppManager.Session} associated with this callback. * @param biIAppUri URI associated this BI interactive app. This is the same URI in * {@link Session#createBiInteractiveApp(Uri, Bundle)} * @param biIAppId BI interactive app ID, which can be used to destroy the BI interactive * app. */ public void onBiInteractiveAppCreated(Session session, Uri biIAppUri, String biIAppId) { } } }