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

Commit c22d0c09 authored by Jae Seo's avatar Jae Seo
Browse files

TIF: Make passthrough related method names consistent

Bug: 17063792
Change-Id: Id76b37ae1507db5d78319b8786b395353ded70e1
parent 1df29f08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16913,7 +16913,7 @@ package android.media.tv {
    method public static final android.net.Uri buildChannelLogoUri(long);
    method public static final android.net.Uri buildChannelLogoUri(android.net.Uri);
    method public static final android.net.Uri buildChannelUri(long);
    method public static final android.net.Uri buildChannelUriForPassthroughTvInput(java.lang.String);
    method public static final android.net.Uri buildChannelUriForPassthroughInput(java.lang.String);
    method public static final android.net.Uri buildChannelsUriForInput(java.lang.String);
    method public static final java.lang.String buildInputId(android.content.ComponentName);
    method public static final android.net.Uri buildProgramUri(long);
@@ -17045,7 +17045,7 @@ package android.media.tv {
    method public java.lang.String getParentId();
    method public android.content.pm.ServiceInfo getServiceInfo();
    method public int getType();
    method public boolean isPassthroughInputType();
    method public boolean isPassthroughInput();
    method public android.graphics.drawable.Drawable loadIcon(android.content.Context);
    method public java.lang.CharSequence loadLabel(android.content.Context);
    method public void writeToParcel(android.os.Parcel, int);
+12 −12
Original line number Diff line number Diff line
@@ -119,12 +119,12 @@ public final class TvContract {
    }

    /**
     * Build a special channel URI intended to be used with pass-through type inputs. (e.g. HDMI)
     * Build a special channel URI intended to be used with pass-through inputs. (e.g. HDMI)
     *
     * @param inputId The ID of the TV input to build a channels URI for.
     * @see TvInputInfo#isPassthroughInputType()
     * @param inputId The ID of the pass-through input to build a channels URI for.
     * @see TvInputInfo#isPassthroughInput()
     */
    public static final Uri buildChannelUriForPassthroughTvInput(String inputId) {
    public static final Uri buildChannelUriForPassthroughInput(String inputId) {
        return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT).authority(AUTHORITY)
                .appendPath(PATH_PASSTHROUGH).appendPath(inputId).build();
    }
@@ -144,7 +144,7 @@ public final class TvContract {
     * @param channelUri The URI of the channel whose logo is pointed to.
     */
    public static final Uri buildChannelLogoUri(Uri channelUri) {
        if (!isChannelUriForTunerTvInput(channelUri)) {
        if (!isChannelUriForTunerInput(channelUri)) {
            throw new IllegalArgumentException("Not a channel: " + channelUri);
        }
        return Uri.withAppendedPath(channelUri, Channels.Logo.CONTENT_DIRECTORY);
@@ -230,7 +230,7 @@ public final class TvContract {
     * @param channelUri The URI of the channel to return programs for.
     */
    public static final Uri buildProgramsUriForChannel(Uri channelUri) {
        if (!isChannelUriForTunerTvInput(channelUri)) {
        if (!isChannelUriForTunerInput(channelUri)) {
            throw new IllegalArgumentException("Not a channel: " + channelUri);
        }
        return buildProgramsUriForChannel(ContentUris.parseId(channelUri));
@@ -265,7 +265,7 @@ public final class TvContract {
     */
    public static final Uri buildProgramsUriForChannel(Uri channelUri, long startTime,
            long endTime) {
        if (!isChannelUriForTunerTvInput(channelUri)) {
        if (!isChannelUriForTunerInput(channelUri)) {
            throw new IllegalArgumentException("Not a channel: " + channelUri);
        }
        return buildProgramsUriForChannel(ContentUris.parseId(channelUri), startTime, endTime);
@@ -296,23 +296,23 @@ public final class TvContract {
     * @hide
     */
    public static final boolean isChannelUri(Uri uri) {
        return isChannelUriForTunerTvInput(uri) || isChannelUriForPassthroughTvInput(uri);
        return isChannelUriForTunerInput(uri) || isChannelUriForPassthroughInput(uri);
    }

    /**
     * Returns true, if {@code uri} is a channel URI for a tuner TV input.
     * Returns true, if {@code uri} is a channel URI for a tuner input.
     * @hide
     */
    public static final boolean isChannelUriForTunerTvInput(Uri uri) {
    public static final boolean isChannelUriForTunerInput(Uri uri) {
        return isTvUri(uri) && isTwoSegmentUriStartingWith(uri, PATH_CHANNEL);
    }

    /**
     * Returns true, if {@code uri} is a channel URI for a passthrough TV input.
     * Returns true, if {@code uri} is a channel URI for a passthrough input.
     * @hide
     */
    @SystemApi
    public static final boolean isChannelUriForPassthroughTvInput(Uri uri) {
    public static final boolean isChannelUriForPassthroughInput(Uri uri) {
        return isTvUri(uri) && isTwoSegmentUriStartingWith(uri, PATH_PASSTHROUGH);
    }

+2 −2
Original line number Diff line number Diff line
@@ -380,9 +380,9 @@ public final class TvInputInfo implements Parcelable {
     * Returns {@code true} if this TV input is pass-though which does not have any real channels
     * in TvProvider. {@code false} otherwise.
     *
     * @see TvContract#buildChannelUriForPassthroughTvInput(String)
     * @see TvContract#buildChannelUriForPassthroughInput(String)
     */
    public boolean isPassthroughInputType() {
    public boolean isPassthroughInput() {
        return mType != TYPE_TUNER;
    }

+1 −1
Original line number Diff line number Diff line
@@ -1223,7 +1223,7 @@ public final class TvInputManagerService extends SystemService {
                    try {
                        getSessionLocked(sessionToken, callingUid, resolvedUserId).tune(
                                channelUri, params);
                        if (TvContract.isChannelUriForPassthroughTvInput(channelUri)) {
                        if (TvContract.isChannelUriForPassthroughInput(channelUri)) {
                            // Do not log the watch history for passthrough inputs.
                            return;
                        }