TIAF: Change on API Review: DTV to VOD
Bug: 217591199 Change-Id: I0bd1e5dd061135468e126444ae1cd8c85ec8ae57
This commit is contained in:
@@ -26065,11 +26065,9 @@ package android.media.tv.interactive {
|
||||
public static final class AppLinkInfo.Builder {
|
||||
ctor public AppLinkInfo.Builder(@NonNull String, @NonNull String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo build();
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setClassName(@NonNull String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setPackageName(@NonNull String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriHost(@Nullable String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriPrefix(@Nullable String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriScheme(@Nullable String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriHost(@NonNull String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriPrefix(@NonNull String);
|
||||
method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriScheme(@NonNull String);
|
||||
}
|
||||
|
||||
public final class TvInteractiveAppInfo implements android.os.Parcelable {
|
||||
|
||||
@@ -18,6 +18,7 @@ package android.media.tv.interactive;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.ComponentName;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
@@ -25,8 +26,7 @@ import android.os.Parcelable;
|
||||
* App link information used by TV interactive app to launch Android apps.
|
||||
*/
|
||||
public final class AppLinkInfo implements Parcelable {
|
||||
private @NonNull String mPackageName;
|
||||
private @NonNull String mClassName;
|
||||
private @NonNull ComponentName mComponentName;
|
||||
private @Nullable String mUriScheme;
|
||||
private @Nullable String mUriHost;
|
||||
private @Nullable String mUriPrefix;
|
||||
@@ -41,12 +41,11 @@ public final class AppLinkInfo implements Parcelable {
|
||||
@Nullable String uriScheme,
|
||||
@Nullable String uriHost,
|
||||
@Nullable String uriPrefix) {
|
||||
this.mPackageName = packageName;
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
NonNull.class, null, mPackageName);
|
||||
this.mClassName = className;
|
||||
NonNull.class, null, packageName);
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
NonNull.class, null, mClassName);
|
||||
NonNull.class, null, className);
|
||||
this.mComponentName = new ComponentName(packageName, className);
|
||||
this.mUriScheme = uriScheme;
|
||||
this.mUriHost = uriHost;
|
||||
this.mUriPrefix = uriPrefix;
|
||||
@@ -57,7 +56,7 @@ public final class AppLinkInfo implements Parcelable {
|
||||
*/
|
||||
@NonNull
|
||||
public String getPackageName() {
|
||||
return mPackageName;
|
||||
return mComponentName.getPackageName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +64,7 @@ public final class AppLinkInfo implements Parcelable {
|
||||
*/
|
||||
@NonNull
|
||||
public String getClassName() {
|
||||
return mClassName;
|
||||
return mComponentName.getClassName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,8 +94,8 @@ public final class AppLinkInfo implements Parcelable {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppLinkInfo { "
|
||||
+ "packageName = " + mPackageName + ", "
|
||||
+ "className = " + mClassName + ", "
|
||||
+ "packageName = " + mComponentName.getPackageName() + ", "
|
||||
+ "className = " + mComponentName.getClassName() + ", "
|
||||
+ "uriScheme = " + mUriScheme + ", "
|
||||
+ "uriHost = " + mUriHost + ", "
|
||||
+ "uriPrefix = " + mUriPrefix
|
||||
@@ -105,8 +104,8 @@ public final class AppLinkInfo implements Parcelable {
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
dest.writeString(mPackageName);
|
||||
dest.writeString(mClassName);
|
||||
dest.writeString(mComponentName.getPackageName());
|
||||
dest.writeString(mComponentName.getClassName());
|
||||
dest.writeString(mUriScheme);
|
||||
dest.writeString(mUriHost);
|
||||
dest.writeString(mUriPrefix);
|
||||
@@ -124,12 +123,11 @@ public final class AppLinkInfo implements Parcelable {
|
||||
String uriHost = in.readString();
|
||||
String uriPrefix = in.readString();
|
||||
|
||||
this.mPackageName = packageName;
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
NonNull.class, null, mPackageName);
|
||||
this.mClassName = className;
|
||||
NonNull.class, null, packageName);
|
||||
com.android.internal.util.AnnotationValidations.validate(
|
||||
NonNull.class, null, mClassName);
|
||||
NonNull.class, null, className);
|
||||
this.mComponentName = new ComponentName(packageName, className);
|
||||
this.mUriScheme = uriScheme;
|
||||
this.mUriHost = uriHost;
|
||||
this.mUriPrefix = uriPrefix;
|
||||
@@ -173,29 +171,11 @@ public final class AppLinkInfo implements Parcelable {
|
||||
NonNull.class, null, mClassName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets package name of the App link.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setPackageName(@NonNull String value) {
|
||||
mPackageName = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets app name of the App link.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setClassName(@NonNull String value) {
|
||||
mClassName = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets URI scheme of the App link.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setUriScheme(@Nullable String value) {
|
||||
public Builder setUriScheme(@NonNull String value) {
|
||||
mUriScheme = value;
|
||||
return this;
|
||||
}
|
||||
@@ -204,7 +184,7 @@ public final class AppLinkInfo implements Parcelable {
|
||||
* Sets URI host of the App link.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setUriHost(@Nullable String value) {
|
||||
public Builder setUriHost(@NonNull String value) {
|
||||
mUriHost = value;
|
||||
return this;
|
||||
}
|
||||
@@ -213,7 +193,7 @@ public final class AppLinkInfo implements Parcelable {
|
||||
* Sets URI prefix of the App link.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setUriPrefix(@Nullable String value) {
|
||||
public Builder setUriPrefix(@NonNull String value) {
|
||||
mUriPrefix = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -760,7 +760,12 @@ public final class TvInteractiveAppManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers app link info.
|
||||
* Registers an Android application link info record which can be used to launch the specific
|
||||
* Android application by TV interactive App RTE.
|
||||
*
|
||||
* @param tvIAppServiceId The ID of TV interactive service which the command to be sent to. The
|
||||
* ID can be found in {@link TvInputInfo#getId()}.
|
||||
* @param appLinkInfo The Android application link info record to be registered.
|
||||
*/
|
||||
public void registerAppLinkInfo(
|
||||
@NonNull String tvIAppServiceId, @NonNull AppLinkInfo appLinkInfo) {
|
||||
@@ -772,7 +777,12 @@ public final class TvInteractiveAppManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters app link info.
|
||||
* Unregisters an Android application link info record which can be used to launch the specific
|
||||
* Android application by TV interactive App RTE.
|
||||
*
|
||||
* @param tvIAppServiceId The ID of TV interactive service which the command to be sent to. The
|
||||
* ID can be found in {@link TvInputInfo#getId()}.
|
||||
* @param appLinkInfo The Android application link info record to be unregistered.
|
||||
*/
|
||||
public void unregisterAppLinkInfo(
|
||||
@NonNull String tvIAppServiceId, @NonNull AppLinkInfo appLinkInfo) {
|
||||
|
||||
@@ -244,13 +244,13 @@ public abstract class TvInteractiveAppService extends Service {
|
||||
public abstract void onPrepare(@TvInteractiveAppInfo.InteractiveAppType int type);
|
||||
|
||||
/**
|
||||
* Registers App link info.
|
||||
* Called when a request to register an Android application link info record is received.
|
||||
*/
|
||||
public void onRegisterAppLinkInfo(@NonNull AppLinkInfo appLinkInfo) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters App link info.
|
||||
* Called when a request to unregister an Android application link info record is received.
|
||||
*/
|
||||
public void onUnregisterAppLinkInfo(@NonNull AppLinkInfo appLinkInfo) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user