diff options
| -rw-r--r-- | core/api/current.txt | 1 | ||||
| -rw-r--r-- | core/res/res/values/attrs.xml | 11 | ||||
| -rw-r--r-- | core/res/res/values/public-staging.xml | 2 | ||||
| -rw-r--r-- | media/java/android/media/tv/ad/TvAdService.java | 8 |
4 files changed, 22 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 7f261d450b42..4458372e0d48 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -428,6 +428,7 @@ package android { field public static final int activityCloseExitAnimation = 16842939; // 0x10100bb field public static final int activityOpenEnterAnimation = 16842936; // 0x10100b8 field public static final int activityOpenExitAnimation = 16842937; // 0x10100b9 + field @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") public static final int adServiceTypes; field public static final int addPrintersActivity = 16843750; // 0x10103e6 field public static final int addStatesFromChildren = 16842992; // 0x10100f0 field public static final int adjustViewBounds = 16843038; // 0x101011e diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index e1c1a42eed81..5cfb1a3e44ba 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -9802,6 +9802,17 @@ <attr name="supportedTypes" format="reference" /> </declare-styleable> + <!-- Use <code>tv-ad-service</code> as the root tag of the XML resource that describes a + android.media.tv.ad.TvAdService, which is referenced from its + android.media.tv.ad.TvAdService#SERVICE_META_DATA meta-data entry. Described here + are the attributes that can be included in that tag. --> + <declare-styleable name="TvAdService"> + <!-- The advertisement types that the TV ad service supports. + Reference to a string array resource that describes the supported types, + e.g. linear, overlay. --> + <attr name="adServiceTypes" format="reference" /> + </declare-styleable> + <!-- Attributes that can be used with <code>rating-system-definition</code> tags inside of the XML resource that describes TV content rating of a {@link android.media.tv.TvInputService}, diff --git a/core/res/res/values/public-staging.xml b/core/res/res/values/public-staging.xml index f10e7f8c337e..540967d28d9b 100644 --- a/core/res/res/values/public-staging.xml +++ b/core/res/res/values/public-staging.xml @@ -117,6 +117,8 @@ <public name="isVirtualDeviceOnly"/> <!-- @FlaggedApi("android.content.pm.sdk_lib_independence") --> <public name="optional"/> + <!-- @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") --> + <public name="adServiceTypes" /> </staging-public-group> <staging-public-group type="id" first-id="0x01bc0000"> diff --git a/media/java/android/media/tv/ad/TvAdService.java b/media/java/android/media/tv/ad/TvAdService.java index 61101f07923c..6897a78647c2 100644 --- a/media/java/android/media/tv/ad/TvAdService.java +++ b/media/java/android/media/tv/ad/TvAdService.java @@ -28,6 +28,14 @@ public abstract class TvAdService extends Service { private static final String TAG = "TvAdService"; /** + * Name under which a TvAdService component publishes information about itself. This meta-data + * must reference an XML resource containing an + * <code><{@link android.R.styleable#TvAdService tv-ad-service}></code> tag. + * @hide + */ + public static final String SERVICE_META_DATA = "android.media.tv.ad.service"; + + /** * Base class for derived classes to implement to provide a TV AD session. */ public abstract static class Session implements KeyEvent.Callback { |