Loading core/api/current.txt +14 −0 Original line number Diff line number Diff line Loading @@ -27639,6 +27639,7 @@ package android.media.tv.ad { public abstract static class TvAdService.Session implements android.view.KeyEvent.Callback { ctor public TvAdService.Session(@NonNull android.content.Context); method @CallSuper public void layoutSurface(int, int, int, int); method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent); method public boolean onKeyDown(int, @Nullable android.view.KeyEvent); method public boolean onKeyLongPress(int, @Nullable android.view.KeyEvent); Loading @@ -27646,6 +27647,7 @@ package android.media.tv.ad { method public boolean onKeyUp(int, @Nullable android.view.KeyEvent); method public abstract void onRelease(); method public abstract boolean onSetSurface(@Nullable android.view.Surface); method public void onSurfaceChanged(int, int, int); method public boolean onTouchEvent(@NonNull android.view.MotionEvent); method public boolean onTrackballEvent(@NonNull android.view.MotionEvent); } Loading @@ -27660,6 +27662,18 @@ package android.media.tv.ad { field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.ad.TvAdServiceInfo> CREATOR; } @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") public class TvAdView extends android.view.ViewGroup { ctor public TvAdView(@NonNull android.content.Context); ctor public TvAdView(@NonNull android.content.Context, @Nullable android.util.AttributeSet); ctor public TvAdView(@NonNull android.content.Context, @Nullable android.util.AttributeSet, int); method public void onAttachedToWindow(); method public void onDetachedFromWindow(); method public void onLayout(boolean, int, int, int, int); method public void onMeasure(int, int); method public void onVisibilityChanged(@NonNull android.view.View, int); method public void prepareAdService(@NonNull String, @NonNull String); } } package android.media.tv.interactive { media/java/android/media/tv/ad/TvAdService.java +0 −2 Original line number Diff line number Diff line Loading @@ -487,7 +487,6 @@ public abstract class TvAdService extends Service { * @param right Right position in pixels, relative to the overlay view. * @param bottom Bottom position in pixels, relative to the overlay view. * * @hide */ @CallSuper public void layoutSurface(final int left, final int top, final int right, Loading Loading @@ -534,7 +533,6 @@ public abstract class TvAdService extends Service { * @param format The new {@link PixelFormat} of the surface. * @param width The new width of the surface. * @param height The new height of the surface. * @hide */ public void onSurfaceChanged(@PixelFormat.Format int format, int width, int height) { } Loading media/java/android/media/tv/ad/TvAdView.java +14 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv.ad; import android.annotation.CallbackExecutor; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; Loading @@ -29,6 +30,7 @@ import android.media.tv.TvInputManager; import android.media.tv.TvTrackInfo; import android.media.tv.TvView; import android.media.tv.ad.TvAdManager.Session.FinishedInputEventCallback; import android.media.tv.flags.Flags; import android.net.Uri; import android.os.Bundle; import android.os.Handler; Loading @@ -48,9 +50,9 @@ import java.util.List; import java.util.concurrent.Executor; /** * Displays contents of TV AD services. * @hide * Displays contents of TV advertisement services. */ @FlaggedApi(Flags.FLAG_ENABLE_AD_SERVICE_FW) public class TvAdView extends ViewGroup { private static final String TAG = "TvAdView"; private static final boolean DEBUG = false; Loading Loading @@ -182,14 +184,12 @@ public class TvAdView extends ViewGroup { return true; } /** @hide */ @Override public void onAttachedToWindow() { super.onAttachedToWindow(); createSessionMediaView(); } /** @hide */ @Override public void onDetachedFromWindow() { removeSessionMediaView(); Loading Loading @@ -381,6 +381,7 @@ public class TvAdView extends ViewGroup { * @param event The input event. * @return If you handled the event, return {@code true}. If you want to allow the event to be * handled by the next receiver, return {@code false}. * @hide */ public boolean onUnhandledInputEvent(@NonNull InputEvent event) { return false; Loading Loading @@ -422,7 +423,7 @@ public class TvAdView extends ViewGroup { } @Override public boolean dispatchKeyEvent(@NonNull KeyEvent event) { public boolean dispatchKeyEvent(@Nullable KeyEvent event) { if (super.dispatchKeyEvent(event)) { return true; } Loading Loading @@ -465,6 +466,7 @@ public class TvAdView extends ViewGroup { /** * Stops the AD service. * @hide */ public void stopAdService() { if (DEBUG) { Loading @@ -479,6 +481,7 @@ 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) { Loading @@ -493,6 +496,7 @@ public class TvAdView extends ViewGroup { * Sends current video bounds to related TV AD service. * * @param bounds the rectangle area for rendering the current video. * @hide */ public void sendCurrentVideoBounds(@NonNull Rect bounds) { if (DEBUG) { Loading @@ -508,6 +512,7 @@ public class TvAdView extends ViewGroup { * * @param channelUri The current channel URI; {@code null} if there is no currently tuned * channel. * @hide */ public void sendCurrentChannelUri(@Nullable Uri channelUri) { if (DEBUG) { Loading @@ -520,6 +525,7 @@ public class TvAdView extends ViewGroup { /** * Sends track info list to related TV AD service. * @hide */ public void sendTrackInfoList(@Nullable List<TvTrackInfo> tracks) { if (DEBUG) { Loading @@ -536,6 +542,7 @@ public class TvAdView extends ViewGroup { * @param inputId The current TV input ID whose channel is tuned. {@code null} if no channel is * tuned. * @see android.media.tv.TvInputInfo * @hide */ public void sendCurrentTvInputId(@Nullable String inputId) { if (DEBUG) { Loading Loading @@ -577,6 +584,7 @@ public class TvAdView extends ViewGroup { * can also be added to the params. * * @see #ERROR_KEY_METHOD_NAME * @hide */ public void notifyError(@NonNull String errMsg, @NonNull Bundle params) { if (DEBUG) { Loading @@ -599,6 +607,7 @@ public class TvAdView extends ViewGroup { * {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}. * See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on * how to parse this data. * @hide */ public void notifyTvMessage(@NonNull @TvInputManager.TvMessageType int type, @NonNull Bundle data) { Loading Loading
core/api/current.txt +14 −0 Original line number Diff line number Diff line Loading @@ -27639,6 +27639,7 @@ package android.media.tv.ad { public abstract static class TvAdService.Session implements android.view.KeyEvent.Callback { ctor public TvAdService.Session(@NonNull android.content.Context); method @CallSuper public void layoutSurface(int, int, int, int); method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent); method public boolean onKeyDown(int, @Nullable android.view.KeyEvent); method public boolean onKeyLongPress(int, @Nullable android.view.KeyEvent); Loading @@ -27646,6 +27647,7 @@ package android.media.tv.ad { method public boolean onKeyUp(int, @Nullable android.view.KeyEvent); method public abstract void onRelease(); method public abstract boolean onSetSurface(@Nullable android.view.Surface); method public void onSurfaceChanged(int, int, int); method public boolean onTouchEvent(@NonNull android.view.MotionEvent); method public boolean onTrackballEvent(@NonNull android.view.MotionEvent); } Loading @@ -27660,6 +27662,18 @@ package android.media.tv.ad { field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.ad.TvAdServiceInfo> CREATOR; } @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") public class TvAdView extends android.view.ViewGroup { ctor public TvAdView(@NonNull android.content.Context); ctor public TvAdView(@NonNull android.content.Context, @Nullable android.util.AttributeSet); ctor public TvAdView(@NonNull android.content.Context, @Nullable android.util.AttributeSet, int); method public void onAttachedToWindow(); method public void onDetachedFromWindow(); method public void onLayout(boolean, int, int, int, int); method public void onMeasure(int, int); method public void onVisibilityChanged(@NonNull android.view.View, int); method public void prepareAdService(@NonNull String, @NonNull String); } } package android.media.tv.interactive {
media/java/android/media/tv/ad/TvAdService.java +0 −2 Original line number Diff line number Diff line Loading @@ -487,7 +487,6 @@ public abstract class TvAdService extends Service { * @param right Right position in pixels, relative to the overlay view. * @param bottom Bottom position in pixels, relative to the overlay view. * * @hide */ @CallSuper public void layoutSurface(final int left, final int top, final int right, Loading Loading @@ -534,7 +533,6 @@ public abstract class TvAdService extends Service { * @param format The new {@link PixelFormat} of the surface. * @param width The new width of the surface. * @param height The new height of the surface. * @hide */ public void onSurfaceChanged(@PixelFormat.Format int format, int width, int height) { } Loading
media/java/android/media/tv/ad/TvAdView.java +14 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.tv.ad; import android.annotation.CallbackExecutor; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; Loading @@ -29,6 +30,7 @@ import android.media.tv.TvInputManager; import android.media.tv.TvTrackInfo; import android.media.tv.TvView; import android.media.tv.ad.TvAdManager.Session.FinishedInputEventCallback; import android.media.tv.flags.Flags; import android.net.Uri; import android.os.Bundle; import android.os.Handler; Loading @@ -48,9 +50,9 @@ import java.util.List; import java.util.concurrent.Executor; /** * Displays contents of TV AD services. * @hide * Displays contents of TV advertisement services. */ @FlaggedApi(Flags.FLAG_ENABLE_AD_SERVICE_FW) public class TvAdView extends ViewGroup { private static final String TAG = "TvAdView"; private static final boolean DEBUG = false; Loading Loading @@ -182,14 +184,12 @@ public class TvAdView extends ViewGroup { return true; } /** @hide */ @Override public void onAttachedToWindow() { super.onAttachedToWindow(); createSessionMediaView(); } /** @hide */ @Override public void onDetachedFromWindow() { removeSessionMediaView(); Loading Loading @@ -381,6 +381,7 @@ public class TvAdView extends ViewGroup { * @param event The input event. * @return If you handled the event, return {@code true}. If you want to allow the event to be * handled by the next receiver, return {@code false}. * @hide */ public boolean onUnhandledInputEvent(@NonNull InputEvent event) { return false; Loading Loading @@ -422,7 +423,7 @@ public class TvAdView extends ViewGroup { } @Override public boolean dispatchKeyEvent(@NonNull KeyEvent event) { public boolean dispatchKeyEvent(@Nullable KeyEvent event) { if (super.dispatchKeyEvent(event)) { return true; } Loading Loading @@ -465,6 +466,7 @@ public class TvAdView extends ViewGroup { /** * Stops the AD service. * @hide */ public void stopAdService() { if (DEBUG) { Loading @@ -479,6 +481,7 @@ 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) { Loading @@ -493,6 +496,7 @@ public class TvAdView extends ViewGroup { * Sends current video bounds to related TV AD service. * * @param bounds the rectangle area for rendering the current video. * @hide */ public void sendCurrentVideoBounds(@NonNull Rect bounds) { if (DEBUG) { Loading @@ -508,6 +512,7 @@ public class TvAdView extends ViewGroup { * * @param channelUri The current channel URI; {@code null} if there is no currently tuned * channel. * @hide */ public void sendCurrentChannelUri(@Nullable Uri channelUri) { if (DEBUG) { Loading @@ -520,6 +525,7 @@ public class TvAdView extends ViewGroup { /** * Sends track info list to related TV AD service. * @hide */ public void sendTrackInfoList(@Nullable List<TvTrackInfo> tracks) { if (DEBUG) { Loading @@ -536,6 +542,7 @@ public class TvAdView extends ViewGroup { * @param inputId The current TV input ID whose channel is tuned. {@code null} if no channel is * tuned. * @see android.media.tv.TvInputInfo * @hide */ public void sendCurrentTvInputId(@Nullable String inputId) { if (DEBUG) { Loading Loading @@ -577,6 +584,7 @@ public class TvAdView extends ViewGroup { * can also be added to the params. * * @see #ERROR_KEY_METHOD_NAME * @hide */ public void notifyError(@NonNull String errMsg, @NonNull Bundle params) { if (DEBUG) { Loading @@ -599,6 +607,7 @@ public class TvAdView extends ViewGroup { * {@link TvInputManager#TV_MESSAGE_KEY_RAW_DATA}. * See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on * how to parse this data. * @hide */ public void notifyTvMessage(@NonNull @TvInputManager.TvMessageType int type, @NonNull Bundle data) { Loading