Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ef2dd51 authored by shubang's avatar shubang Committed by Shubang Lu
Browse files

TIAF: rename IApp -> InteractiveApp part 1/2

based on advice from API Council

Changes related to API or system server will be in the following CL

Bug: 213836031
Bug: 205738783
Test: mmm
Change-Id: Ieb549c49aa0e13b19dc97822ee53ba2bc99fb0c3
parent 188675b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ interface ITvInputManager {
    void setCaptionEnabled(in IBinder sessionToken, boolean enabled, int userId);
    void selectTrack(in IBinder sessionToken, int type, in String trackId, int userId);

    void setIAppNotificationEnabled(in IBinder sessionToken, boolean enabled, int userId);
    void setInteractiveAppNotificationEnabled(in IBinder sessionToken, boolean enabled, int userId);

    void sendAppPrivateCommand(in IBinder sessionToken, in String action, in Bundle data,
            int userId);
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ oneway interface ITvInputSession {
    void setCaptionEnabled(boolean enabled);
    void selectTrack(int type, in String trackId);

    void setIAppNotificationEnabled(boolean enable);
    void setInteractiveAppNotificationEnabled(boolean enable);

    void appPrivateCommand(in String action, in Bundle data);

+2 −2
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
                break;
            }
            case DO_SET_IAPP_NOTIFICATION_ENABLED: {
                mTvInputSessionImpl.setIAppNotificationEnabled((Boolean) msg.obj);
                mTvInputSessionImpl.setInteractiveAppNotificationEnabled((Boolean) msg.obj);
                break;
            }
            case DO_REQUEST_AD: {
@@ -322,7 +322,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
    }

    @Override
    public void setIAppNotificationEnabled(boolean enabled) {
    public void setInteractiveAppNotificationEnabled(boolean enabled) {
        mCaller.executeOrSendMessage(
                mCaller.obtainMessageO(DO_SET_IAPP_NOTIFICATION_ENABLED, enabled));
    }
+31 −23
Original line number Diff line number Diff line
@@ -735,8 +735,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onTracksChanged(mSession, tracks);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyTracksChanged(tracks);
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyTracksChanged(tracks);
                    }
                }
            });
@@ -747,8 +748,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onTrackSelected(mSession, type, trackId);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyTrackSelected(type, trackId);
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyTrackSelected(type, trackId);
                    }
                }
            });
@@ -768,8 +770,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onVideoAvailable(mSession);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyVideoAvailable();
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyVideoAvailable();
                    }
                }
            });
@@ -780,8 +783,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onVideoUnavailable(mSession, reason);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyVideoUnavailable(reason);
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyVideoUnavailable(reason);
                    }
                }
            });
@@ -792,8 +796,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onContentAllowed(mSession);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyContentAllowed();
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyContentAllowed();
                    }
                }
            });
@@ -804,8 +809,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onContentBlocked(mSession, rating);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyContentBlocked(rating);
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyContentBlocked(rating);
                    }
                }
            });
@@ -871,8 +877,9 @@ public final class TvInputManager {
                @Override
                public void run() {
                    mSessionCallback.onTuned(mSession, channelUri);
                    if (mSession.mIAppNotificationEnabled && mSession.getIAppSession() != null) {
                        mSession.getIAppSession().notifyTuned(channelUri);
                    if (mSession.mIAppNotificationEnabled
                            && mSession.getInteractiveAppSession() != null) {
                        mSession.getInteractiveAppSession().notifyTuned(channelUri);
                    }
                }
            });
@@ -903,8 +910,9 @@ public final class TvInputManager {
                mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                        if (mSession.getIAppSession() != null) {
                            mSession.getIAppSession().notifyBroadcastInfoResponse(response);
                        if (mSession.getInteractiveAppSession() != null) {
                            mSession.getInteractiveAppSession()
                                    .notifyBroadcastInfoResponse(response);
                        }
                    }
                });
@@ -916,8 +924,8 @@ public final class TvInputManager {
                mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                        if (mSession.getIAppSession() != null) {
                            mSession.getIAppSession().notifyAdResponse(response);
                        if (mSession.getInteractiveAppSession() != null) {
                            mSession.getInteractiveAppSession().notifyAdResponse(response);
                        }
                    }
                });
@@ -2265,12 +2273,12 @@ public final class TvInputManager {
            mSessionCallbackRecordMap = sessionCallbackRecordMap;
        }

        public TvIAppManager.Session getIAppSession() {
        public TvIAppManager.Session getInteractiveAppSession() {
            return mIAppSession;
        }

        public void setIAppSession(TvIAppManager.Session IAppSession) {
            this.mIAppSession = IAppSession;
        public void setInteractiveAppSession(TvIAppManager.Session iAppSession) {
            this.mIAppSession = iAppSession;
        }

        /**
@@ -2531,13 +2539,13 @@ public final class TvInputManager {
         *                {@code false} otherwise.
         * @hide
         */
        public void setIAppNotificationEnabled(boolean enabled) {
        public void setInteractiveAppNotificationEnabled(boolean enabled) {
            if (mToken == null) {
                Log.w(TAG, "The session has been already released");
                return;
            }
            try {
                mService.setIAppNotificationEnabled(mToken, enabled, mUserId);
                mService.setInteractiveAppNotificationEnabled(mToken, enabled, mUserId);
                mIAppNotificationEnabled = enabled;
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
+4 −4
Original line number Diff line number Diff line
@@ -1180,7 +1180,7 @@ public abstract class TvInputService extends Service {
         * @param enabled {@code true} to enable, {@code false} to disable.
         * @hide
         */
        public void onSetIAppNotificationEnabled(boolean enabled) {
        public void onSetInteractiveAppNotificationEnabled(boolean enabled) {
        }

        /**
@@ -1532,10 +1532,10 @@ public abstract class TvInputService extends Service {
        }

        /**
         * Calls {@link #onSetIAppNotificationEnabled}.
         * Calls {@link #onSetInteractiveAppNotificationEnabled}.
         */
        void setIAppNotificationEnabled(boolean enabled) {
            onSetIAppNotificationEnabled(enabled);
        void setInteractiveAppNotificationEnabled(boolean enabled) {
            onSetInteractiveAppNotificationEnabled(enabled);
        }

        /**
Loading