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

Commit 74e00356 authored by Shubang Lu's avatar Shubang Lu
Browse files

[CSAI API] Unhide start / stop service APIs

Bug: 321108085
Test: CtsTvTestCases
API-Coverage-Bug: 320723228
Change-Id: I9a1a9311103ff8f5a5f1d168f32de423d8137396
parent 1927527c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -27632,6 +27632,8 @@ package android.media.tv.ad {
  @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") public class TvAdManager {
    method @NonNull public java.util.List<android.media.tv.ad.TvAdServiceInfo> getTvAdServiceList();
    method public void registerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.ad.TvAdManager.TvAdServiceCallback);
    method public void unregisterCallback(@NonNull android.media.tv.ad.TvAdManager.TvAdServiceCallback);
  }
  public abstract static class TvAdManager.TvAdServiceCallback {
@@ -27658,7 +27660,10 @@ package android.media.tv.ad {
    method public boolean onKeyMultiple(int, int, @Nullable android.view.KeyEvent);
    method public boolean onKeyUp(int, @Nullable android.view.KeyEvent);
    method public abstract void onRelease();
    method public void onResetAdService();
    method public abstract boolean onSetSurface(@Nullable android.view.Surface);
    method public void onStartAdService();
    method public void onStopAdService();
    method public void onSurfaceChanged(int, int, int);
    method public boolean onTouchEvent(@NonNull android.view.MotionEvent);
    method public boolean onTrackballEvent(@NonNull android.view.MotionEvent);
@@ -27684,6 +27689,10 @@ package android.media.tv.ad {
    method public void onMeasure(int, int);
    method public void onVisibilityChanged(@NonNull android.view.View, int);
    method public void prepareAdService(@NonNull String, @NonNull String);
    method public void reset();
    method public void resetAdService();
    method public void startAdService();
    method public void stopAdService();
  }
}
+0 −2
Original line number Diff line number Diff line
@@ -510,7 +510,6 @@ public class TvAdManager {
     *
     * @param callback A callback used to monitor status of the TV AD services.
     * @param executor A {@link Executor} that the status change will be delivered to.
     * @hide
     */
    public void registerCallback(
            @CallbackExecutor @NonNull Executor executor,
@@ -526,7 +525,6 @@ public class TvAdManager {
     * Unregisters the existing {@link TvAdServiceCallback}.
     *
     * @param callback The existing callback to remove.
     * @hide
     */
    public void unregisterCallback(@NonNull final TvAdServiceCallback callback) {
        Preconditions.checkNotNull(callback);
+0 −3
Original line number Diff line number Diff line
@@ -253,21 +253,18 @@ public abstract class TvAdService extends Service {

        /**
         * Starts TvAdService session.
         * @hide
         */
        public void onStartAdService() {
        }

        /**
         * Stops TvAdService session.
         * @hide
         */
        public void onStopAdService() {
        }

        /**
         * Resets TvAdService session.
         * @hide
         */
        public void onResetAdService() {
        }
+0 −4
Original line number Diff line number Diff line
@@ -259,7 +259,6 @@ public class TvAdView extends ViewGroup {
     * Resets this TvAdView to release its resources.
     *
     * <p>It can be reused by call {@link #prepareAdService(String, String)}.
     * @hide
     */
    public void reset() {
        if (DEBUG) Log.d(TAG, "reset()");
@@ -453,7 +452,6 @@ public class TvAdView extends ViewGroup {

    /**
     * Starts the AD service.
     * @hide
     */
    public void startAdService() {
        if (DEBUG) {
@@ -466,7 +464,6 @@ public class TvAdView extends ViewGroup {

    /**
     * Stops the AD service.
     * @hide
     */
    public void stopAdService() {
        if (DEBUG) {
@@ -481,7 +478,6 @@ public class TvAdView extends ViewGroup {
     * Resets the AD service.
     *
     * <p>This releases the resources of the corresponding {@link TvAdService.Session}.
     * @hide
     */
    public void resetAdService() {
        if (DEBUG) {