Merge "CSAI: Add attr for TV AD service" into main

This commit is contained in:
Shubang Lu 2023-12-14 19:13:40 +00:00 committed by Android (Google) Code Review
commit 1d00de07dd
4 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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},

View File

@ -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">

View File

@ -27,6 +27,14 @@ public abstract class TvAdService extends Service {
private static final boolean DEBUG = false;
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>&lt;{@link android.R.styleable#TvAdService tv-ad-service}&gt;</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.
*/