am 697896b0: am b6ba4f21: am d250789a: TIF: Make passthrough related method names consistent
* commit '697896b0a1af1d34b9aa10983d6c0cf11dfae914': TIF: Make passthrough related method names consistent
This commit is contained in:
@@ -16917,7 +16917,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);
|
||||
@@ -17049,7 +17049,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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user