Merge "[TIAF] Fixed TIAS can not receive onTuned event"

This commit is contained in:
TreeHugger Robot
2022-01-10 08:41:12 +00:00
committed by Android (Google) Code Review
3 changed files with 32 additions and 0 deletions

View File

@@ -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

View File

@@ -127,6 +127,7 @@ public final class TvIAppInfo implements Parcelable {
/**
* Gets supported interactive app types
*/
@NonNull
public List<String> getSupportedTypes() {
return new ArrayList<>(mTypes);
}

View File

@@ -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 =