From c22d0c0941ab65ca69977d002c4431394a735c7d Mon Sep 17 00:00:00 2001 From: Jae Seo Date: Fri, 15 Aug 2014 13:03:21 -0700 Subject: [PATCH] TIF: Make passthrough related method names consistent Bug: 17063792 Change-Id: Id76b37ae1507db5d78319b8786b395353ded70e1 --- api/current.txt | 4 ++-- media/java/android/media/tv/TvContract.java | 24 +++++++++---------- media/java/android/media/tv/TvInputInfo.java | 4 ++-- .../server/tv/TvInputManagerService.java | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/api/current.txt b/api/current.txt index 1cb0c8f8fe1e1..cb6c512767bfd 100644 --- a/api/current.txt +++ b/api/current.txt @@ -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); diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java index 9a32bd6677121..bdceb24f0a99e 100644 --- a/media/java/android/media/tv/TvContract.java +++ b/media/java/android/media/tv/TvContract.java @@ -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); } diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java index 6ed758073222f..ff4892b75bcb8 100644 --- a/media/java/android/media/tv/TvInputInfo.java +++ b/media/java/android/media/tv/TvInputInfo.java @@ -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; } diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java index 3b5e79d9dea68..aa8c391567eb2 100644 --- a/services/core/java/com/android/server/tv/TvInputManagerService.java +++ b/services/core/java/com/android/server/tv/TvInputManagerService.java @@ -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; }