Loading media/java/android/media/tv/interactive/ITvIAppManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ interface ITvIAppManager { void createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId); void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId); void setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId); void sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId); void sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId); void sendStreamVolume(in IBinder sessionToken, float volume, int userId); Loading media/java/android/media/tv/interactive/ITvInteractiveAppClient.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ oneway interface ITvInteractiveAppClient { void onRemoveBroadcastInfo(int id, int seq); void onSessionStateChanged(int state, int seq); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq); void onTeletextAppStateChanged(int state, int seq); void onCommandRequest(in String cmdType, in Bundle parameters, int seq); void onSetVideoBounds(in Rect rect, int seq); void onRequestCurrentChannelUri(int seq); Loading media/java/android/media/tv/interactive/ITvInteractiveAppSession.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ oneway interface ITvInteractiveAppSession { void resetInteractiveApp(); void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); void destroyBiInteractiveApp(in String biIAppId); void setTeletextAppEnabled(boolean enable); void sendCurrentChannelUri(in Uri channelUri); void sendCurrentChannelLcn(int lcn); void sendStreamVolume(float volume); Loading media/java/android/media/tv/interactive/ITvInteractiveAppSessionCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ oneway interface ITvInteractiveAppSessionCallback { void onRemoveBroadcastInfo(int id); void onSessionStateChanged(int state); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); void onTeletextAppStateChanged(int state); void onCommandRequest(in String cmdType, in Bundle parameters); void onSetVideoBounds(in Rect rect); void onRequestCurrentChannelUri(); Loading media/java/android/media/tv/interactive/TvIAppManager.java 100644 → 100755 +68 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,30 @@ public final class TvIAppManager { */ public static final int TV_INTERACTIVE_APP_RTE_STATE_ERROR = 4; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = false, prefix = "TELETEXT_APP_STATE_", value = { TELETEXT_APP_STATE_SHOW, TELETEXT_APP_STATE_HIDE, TELETEXT_APP_STATE_ERROR}) public @interface TeletextAppState {} /** * Show state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_SHOW = 1; /** * Hide state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_HIDE = 2; /** * Error state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_ERROR = 3; /** * Key for package name in app link. * <p>Type: String Loading Loading @@ -381,6 +405,18 @@ public final class TvIAppManager { record.postBiInteractiveAppCreated(biIAppUri, biIAppId); } } @Override public void onTeletextAppStateChanged(int state, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postTeletextAppStateChanged(state); } } }; ITvInteractiveAppManagerCallback managerCallback = new ITvInteractiveAppManagerCallback.Stub() { Loading Loading @@ -801,6 +837,18 @@ public final class TvIAppManager { } } void setTeletextAppEnabled(boolean enable) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.setTeletextAppEnabled(mToken, enable, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } void sendCurrentChannelUri(@Nullable Uri channelUri) { if (mToken == null) { Log.w(TAG, "The session has been already released"); Loading Loading @@ -1522,6 +1570,15 @@ public final class TvIAppManager { } }); } void postTeletextAppStateChanged(int state) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onTeletextAppStateChanged(mSession, state); } }); } } /** Loading Loading @@ -1647,5 +1704,16 @@ public final class TvIAppManager { */ public void onBiInteractiveAppCreated(Session session, Uri biIAppUri, String biIAppId) { } /** * This is called when {@link TvIAppService.Session#notifyTeletextAppStateChanged} is * called. * * @param session A {@link TvIAppManager.Session} associated with this callback. * @param state the current state. */ public void onTeletextAppStateChanged( Session session, @TvIAppManager.TeletextAppState int state) { } } } Loading
media/java/android/media/tv/interactive/ITvIAppManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ interface ITvIAppManager { void createBiInteractiveApp( in IBinder sessionToken, in Uri biIAppUri, in Bundle params, int userId); void destroyBiInteractiveApp(in IBinder sessionToken, in String biIAppId, int userId); void setTeletextAppEnabled(in IBinder sessionToken, boolean enable, int userId); void sendCurrentChannelUri(in IBinder sessionToken, in Uri channelUri, int userId); void sendCurrentChannelLcn(in IBinder sessionToken, int lcn, int userId); void sendStreamVolume(in IBinder sessionToken, float volume, int userId); Loading
media/java/android/media/tv/interactive/ITvInteractiveAppClient.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ oneway interface ITvInteractiveAppClient { void onRemoveBroadcastInfo(int id, int seq); void onSessionStateChanged(int state, int seq); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId, int seq); void onTeletextAppStateChanged(int state, int seq); void onCommandRequest(in String cmdType, in Bundle parameters, int seq); void onSetVideoBounds(in Rect rect, int seq); void onRequestCurrentChannelUri(int seq); Loading
media/java/android/media/tv/interactive/ITvInteractiveAppSession.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ oneway interface ITvInteractiveAppSession { void resetInteractiveApp(); void createBiInteractiveApp(in Uri biIAppUri, in Bundle params); void destroyBiInteractiveApp(in String biIAppId); void setTeletextAppEnabled(boolean enable); void sendCurrentChannelUri(in Uri channelUri); void sendCurrentChannelLcn(int lcn); void sendStreamVolume(float volume); Loading
media/java/android/media/tv/interactive/ITvInteractiveAppSessionCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ oneway interface ITvInteractiveAppSessionCallback { void onRemoveBroadcastInfo(int id); void onSessionStateChanged(int state); void onBiInteractiveAppCreated(in Uri biIAppUri, in String biIAppId); void onTeletextAppStateChanged(int state); void onCommandRequest(in String cmdType, in Bundle parameters); void onSetVideoBounds(in Rect rect); void onRequestCurrentChannelUri(); Loading
media/java/android/media/tv/interactive/TvIAppManager.java 100644 → 100755 +68 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,30 @@ public final class TvIAppManager { */ public static final int TV_INTERACTIVE_APP_RTE_STATE_ERROR = 4; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = false, prefix = "TELETEXT_APP_STATE_", value = { TELETEXT_APP_STATE_SHOW, TELETEXT_APP_STATE_HIDE, TELETEXT_APP_STATE_ERROR}) public @interface TeletextAppState {} /** * Show state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_SHOW = 1; /** * Hide state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_HIDE = 2; /** * Error state of Teletext app. * @hide */ public static final int TELETEXT_APP_STATE_ERROR = 3; /** * Key for package name in app link. * <p>Type: String Loading Loading @@ -381,6 +405,18 @@ public final class TvIAppManager { record.postBiInteractiveAppCreated(biIAppUri, biIAppId); } } @Override public void onTeletextAppStateChanged(int state, int seq) { synchronized (mSessionCallbackRecordMap) { SessionCallbackRecord record = mSessionCallbackRecordMap.get(seq); if (record == null) { Log.e(TAG, "Callback not found for seq " + seq); return; } record.postTeletextAppStateChanged(state); } } }; ITvInteractiveAppManagerCallback managerCallback = new ITvInteractiveAppManagerCallback.Stub() { Loading Loading @@ -801,6 +837,18 @@ public final class TvIAppManager { } } void setTeletextAppEnabled(boolean enable) { if (mToken == null) { Log.w(TAG, "The session has been already released"); return; } try { mService.setTeletextAppEnabled(mToken, enable, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } void sendCurrentChannelUri(@Nullable Uri channelUri) { if (mToken == null) { Log.w(TAG, "The session has been already released"); Loading Loading @@ -1522,6 +1570,15 @@ public final class TvIAppManager { } }); } void postTeletextAppStateChanged(int state) { mHandler.post(new Runnable() { @Override public void run() { mSessionCallback.onTeletextAppStateChanged(mSession, state); } }); } } /** Loading Loading @@ -1647,5 +1704,16 @@ public final class TvIAppManager { */ public void onBiInteractiveAppCreated(Session session, Uri biIAppUri, String biIAppId) { } /** * This is called when {@link TvIAppService.Session#notifyTeletextAppStateChanged} is * called. * * @param session A {@link TvIAppManager.Session} associated with this callback. * @param state the current state. */ public void onTeletextAppStateChanged( Session session, @TvIAppManager.TeletextAppState int state) { } } }