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

Commit aaf5caef authored by Shubang Lu's avatar Shubang Lu Committed by Android (Google) Code Review
Browse files

Merge "TIAF API review: rename TvInteractiveAppInfo" into tm-dev

parents 8987377b f060d9de
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -26105,21 +26105,8 @@ package android.media.tv.interactive {
    method @NonNull public android.media.tv.interactive.AppLinkInfo.Builder setUriScheme(@NonNull String);
  }
  public final class TvInteractiveAppInfo implements android.os.Parcelable {
    ctor public TvInteractiveAppInfo(@NonNull android.content.Context, @NonNull android.content.ComponentName);
    method public int describeContents();
    method @NonNull public String getId();
    method @Nullable public android.content.pm.ServiceInfo getServiceInfo();
    method @NonNull public int getSupportedTypes();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.interactive.TvInteractiveAppInfo> CREATOR;
    field public static final int INTERACTIVE_APP_TYPE_ATSC = 2; // 0x2
    field public static final int INTERACTIVE_APP_TYPE_GINGA = 4; // 0x4
    field public static final int INTERACTIVE_APP_TYPE_HBBTV = 1; // 0x1
  }
  public final class TvInteractiveAppManager {
    method @NonNull public java.util.List<android.media.tv.interactive.TvInteractiveAppInfo> getTvInteractiveAppServiceList();
    method @NonNull public java.util.List<android.media.tv.interactive.TvInteractiveAppServiceInfo> getTvInteractiveAppServiceList();
    method public void prepare(@NonNull String, int);
    method public void registerAppLinkInfo(@NonNull String, @NonNull android.media.tv.interactive.AppLinkInfo);
    method public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.interactive.TvInteractiveAppManager.TvInteractiveAppCallback);
@@ -26242,6 +26229,19 @@ package android.media.tv.interactive {
    method @CallSuper public void setVideoBounds(@NonNull android.graphics.Rect);
  }
  public final class TvInteractiveAppServiceInfo implements android.os.Parcelable {
    ctor public TvInteractiveAppServiceInfo(@NonNull android.content.Context, @NonNull android.content.ComponentName);
    method public int describeContents();
    method @NonNull public String getId();
    method @Nullable public android.content.pm.ServiceInfo getServiceInfo();
    method @NonNull public int getSupportedTypes();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.interactive.TvInteractiveAppServiceInfo> CREATOR;
    field public static final int INTERACTIVE_APP_TYPE_ATSC = 2; // 0x2
    field public static final int INTERACTIVE_APP_TYPE_GINGA = 4; // 0x4
    field public static final int INTERACTIVE_APP_TYPE_HBBTV = 1; // 0x1
  }
  public class TvInteractiveAppView extends android.view.ViewGroup {
    ctor public TvInteractiveAppView(@NonNull android.content.Context);
    ctor public TvInteractiveAppView(@NonNull android.content.Context, @Nullable android.util.AttributeSet);
+3 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package android.media.tv;

import android.annotation.NonNull;
import android.media.tv.interactive.TvInteractiveAppInfo;
import android.media.tv.interactive.TvInteractiveAppServiceInfo;
import android.os.Parcel;
import android.os.Parcelable;

@@ -50,7 +50,7 @@ public final class AitInfo implements Parcelable {
    /**
     * Constructs AIT info.
     */
    public AitInfo(@TvInteractiveAppInfo.InteractiveAppType int type, int version) {
    public AitInfo(@TvInteractiveAppServiceInfo.InteractiveAppType int type, int version) {
        mType = type;
        mVersion = version;
    }
@@ -58,7 +58,7 @@ public final class AitInfo implements Parcelable {
    /**
     * Gets interactive app type.
     */
    @TvInteractiveAppInfo.InteractiveAppType
    @TvInteractiveAppServiceInfo.InteractiveAppType
    public int getType() {
        return mType;
    }
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.media.tv.TvTrackInfo;
import android.media.tv.interactive.AppLinkInfo;
import android.media.tv.interactive.ITvInteractiveAppClient;
import android.media.tv.interactive.ITvInteractiveAppManagerCallback;
import android.media.tv.interactive.TvInteractiveAppInfo;
import android.media.tv.interactive.TvInteractiveAppServiceInfo;
import android.net.Uri;
import android.os.Bundle;
import android.view.Surface;
@@ -33,7 +33,7 @@ import android.view.Surface;
 * @hide
 */
interface ITvInteractiveAppManager {
    List<TvInteractiveAppInfo> getTvInteractiveAppServiceList(int userId);
    List<TvInteractiveAppServiceInfo> getTvInteractiveAppServiceList(int userId);
    void prepare(String tiasId, int type, int userId);
    void registerAppLinkInfo(String tiasId, in AppLinkInfo info, int userId);
    void unregisterAppLinkInfo(String tiasId, in AppLinkInfo info, int userId);
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package android.media.tv.interactive;

import android.media.tv.interactive.TvInteractiveAppInfo;
import android.media.tv.interactive.TvInteractiveAppServiceInfo;

/**
 * Interface to receive callbacks from ITvInteractiveAppManager regardless of sessions.
@@ -26,6 +26,6 @@ interface ITvInteractiveAppManagerCallback {
    void onInteractiveAppServiceAdded(in String iAppServiceId);
    void onInteractiveAppServiceRemoved(in String iAppServiceId);
    void onInteractiveAppServiceUpdated(in String iAppServiceId);
    void onTvInteractiveAppInfoUpdated(in TvInteractiveAppInfo tvIAppInfo);
    void onTvInteractiveAppServiceInfoUpdated(in TvInteractiveAppServiceInfo tvIAppInfo);
    void onStateChanged(in String iAppServiceId, int type, int state, int err);
}
 No newline at end of file
+15 −13
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ public final class TvInteractiveAppManager {
     *
     * @see #sendAppLinkCommand(String, Bundle)
     * @see #ACTION_APP_LINK_COMMAND
     * @see android.media.tv.interactive.TvInteractiveAppInfo#getId()
     * @see android.media.tv.interactive.TvInteractiveAppServiceInfo#getId()
     */
    public static final String INTENT_KEY_INTERACTIVE_APP_SERVICE_ID = "interactive_app_id";

@@ -269,7 +269,7 @@ public final class TvInteractiveAppManager {
     *
     * @see #sendAppLinkCommand(String, Bundle)
     * @see #ACTION_APP_LINK_COMMAND
     * @see android.media.tv.interactive.TvInteractiveAppInfo#getSupportedTypes()
     * @see android.media.tv.interactive.TvInteractiveAppServiceInfo#getSupportedTypes()
     * @see android.media.tv.interactive.TvInteractiveAppView#createBiInteractiveApp(Uri, Bundle)
     */
    public static final String INTENT_KEY_BI_INTERACTIVE_APP_TYPE = "bi_interactive_app_type";
@@ -543,11 +543,11 @@ public final class TvInteractiveAppManager {
            }

            @Override
            public void onTvInteractiveAppInfoUpdated(TvInteractiveAppInfo iAppInfo) {
            public void onTvInteractiveAppServiceInfoUpdated(TvInteractiveAppServiceInfo iAppInfo) {
                // TODO: add public API updateInteractiveAppInfo()
                synchronized (mLock) {
                    for (TvInteractiveAppCallbackRecord record : mCallbackRecords) {
                        record.postTvInteractiveAppInfoUpdated(iAppInfo);
                        record.postTvInteractiveAppServiceInfoUpdated(iAppInfo);
                    }
                }
            }
@@ -611,16 +611,17 @@ public final class TvInteractiveAppManager {
         * This is called when the information about an existing TV Interactive App service has been
         * updated.
         *
         * <p>Because the system automatically creates a <code>TvInteractiveAppInfo</code> object
         * for each TV Interactive App service based on the information collected from the
         * <p>Because the system automatically creates a <code>TvInteractiveAppServiceInfo</code>
         * object for each TV Interactive App service based on the information collected from the
         * <code>AndroidManifest.xml</code>, this method is only called back when such information
         * has changed dynamically.
         *
         * @param iAppInfo The <code>TvInteractiveAppInfo</code> object that contains new
         * @param iAppInfo The <code>TvInteractiveAppServiceInfo</code> object that contains new
         *                 information.
         * @hide
         */
        public void onTvInteractiveAppInfoUpdated(@NonNull TvInteractiveAppInfo iAppInfo) {
        public void onTvInteractiveAppServiceInfoUpdated(
                @NonNull TvInteractiveAppServiceInfo iAppInfo) {
        }

        /**
@@ -634,7 +635,7 @@ public final class TvInteractiveAppManager {
         */
        public void onTvInteractiveAppServiceStateChanged(
                @NonNull String iAppServiceId,
                @TvInteractiveAppInfo.InteractiveAppType int type,
                @TvInteractiveAppServiceInfo.InteractiveAppType int type,
                @ServiceState int state,
                @ErrorCode int err) {
        }
@@ -680,11 +681,12 @@ public final class TvInteractiveAppManager {
            });
        }

        public void postTvInteractiveAppInfoUpdated(final TvInteractiveAppInfo iAppInfo) {
        public void postTvInteractiveAppServiceInfoUpdated(
                final TvInteractiveAppServiceInfo iAppInfo) {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                    mCallback.onTvInteractiveAppInfoUpdated(iAppInfo);
                    mCallback.onTvInteractiveAppServiceInfoUpdated(iAppInfo);
                }
            });
        }
@@ -737,11 +739,11 @@ public final class TvInteractiveAppManager {
    /**
     * Returns the complete list of TV Interactive App service on the system.
     *
     * @return List of {@link TvInteractiveAppInfo} for each TV Interactive App service that
     * @return List of {@link TvInteractiveAppServiceInfo} for each TV Interactive App service that
     *         describes its meta information.
     */
    @NonNull
    public List<TvInteractiveAppInfo> getTvInteractiveAppServiceList() {
    public List<TvInteractiveAppServiceInfo> getTvInteractiveAppServiceList() {
        try {
            return mService.getTvInteractiveAppServiceList(mUserId);
        } catch (RemoteException e) {
Loading