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

Commit 5032604f authored by jian.cui's avatar jian.cui Committed by Yixiao Luo
Browse files

[TIAF] Fixed TIAS can not receive onTuned event



Signed-off-by: default avatarjian.cui <jian.cui@seraphic-corp.com>
Change-Id: I07426b345c58dfb3bb62627bbc72ede2ac95fd87
parent 4d4314dd
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -592,6 +592,24 @@ public abstract class TvInputService extends Service {
            });
        }

        /** @hide */
        public void notifyTuned(@NonNull Uri channelUri) {
            executeOrPostRunnableOnMainThread(new Runnable() {
                @MainThread
                @Override
                public void run() {
                    try {
                        if (DEBUG) Log.d(TAG, "notifyTuned");
                        if (mSessionCallback != null) {
                            mSessionCallback.onTuned(channelUri);
                        }
                    } catch (RemoteException e) {
                        Log.w(TAG, "error in notifyTuned", e);
                    }
                }
            });
        }

        /**
         * Sends the list of all audio/video/subtitle tracks. The is used by the framework to
         * maintain the track information for a given session, which in turn is used by
+1 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ public final class TvIAppInfo implements Parcelable {
    /**
     * Gets supported interactive app types
     */
    @NonNull
    public List<String> getSupportedTypes() {
        return new ArrayList<>(mTypes);
    }
+13 −0
Original line number Diff line number Diff line
@@ -113,6 +113,19 @@ public abstract class TvIAppService extends Service {
    public static final String IAPP_SERVICE_COMMAND_TYPE_SET_STREAM_VOLUME = "set_stream_volume";
    /** @hide */
    public static final String IAPP_SERVICE_COMMAND_TYPE_SELECT_TRACK = "select_track";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_CHANNEL_URI = "command_channel_uri";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_INPUT_ID = "command_input_id";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_VOLUME = "command_volume";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_TRACK_TYPE = "command_track_type";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_TRACK_ID = "command_track_id";
    /** @hide */
    public static final String COMMAND_PARAMETER_KEY_TRACK_SELECT_MODE =
            "command_track_select_mode";

    private final Handler mServiceHandler = new ServiceHandler();
    private final RemoteCallbackList<ITvIAppServiceCallback> mCallbacks =