am 53ac5ef2: am 91726f4e: Merge "Add banner attribute to app manifest" into klp-modular-dev

* commit '53ac5ef2141c7e7d99d5c00195bc65e86e7fc403':
  Add banner attribute to app manifest
This commit is contained in:
Jose Lima
2014-03-13 18:08:51 +00:00
committed by Android Git Automerger
9 changed files with 269 additions and 22 deletions

View File

@ -311,6 +311,7 @@ package android {
field public static final int backgroundSplit = 16843659; // 0x101038b
field public static final int backgroundStacked = 16843658; // 0x101038a
field public static final int backupAgent = 16843391; // 0x101027f
field public static final int banner = 16843762; // 0x10103f2
field public static final int baseline = 16843548; // 0x101031c
field public static final int baselineAlignBottom = 16843042; // 0x1010122
field public static final int baselineAligned = 16843046; // 0x1010126
@ -7079,6 +7080,7 @@ package android.content.pm {
ctor public ComponentInfo();
ctor public ComponentInfo(android.content.pm.ComponentInfo);
ctor protected ComponentInfo(android.os.Parcel);
method public final int getBannerResource();
method public final int getIconResource();
method public final int getLogoResource();
method public boolean isEnabled();
@ -7182,11 +7184,13 @@ package android.content.pm {
ctor protected PackageItemInfo(android.os.Parcel);
method protected void dumpBack(android.util.Printer, java.lang.String);
method protected void dumpFront(android.util.Printer, java.lang.String);
method public android.graphics.drawable.Drawable loadBanner(android.content.pm.PackageManager);
method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
method public android.graphics.drawable.Drawable loadLogo(android.content.pm.PackageManager);
method public android.content.res.XmlResourceParser loadXmlMetaData(android.content.pm.PackageManager, java.lang.String);
method public void writeToParcel(android.os.Parcel, int);
field public int banner;
field public int icon;
field public int labelRes;
field public int logo;
@ -7214,12 +7218,16 @@ package android.content.pm {
method public abstract void clearPackagePreferredActivities(java.lang.String);
method public abstract java.lang.String[] currentToCanonicalPackageNames(java.lang.String[]);
method public abstract void extendVerificationTimeout(int, int, long);
method public abstract android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.graphics.drawable.Drawable getActivityBanner(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.graphics.drawable.Drawable getActivityIcon(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.content.pm.ActivityInfo getActivityInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.graphics.drawable.Drawable getActivityLogo(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract android.graphics.drawable.Drawable getActivityLogo(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract java.util.List<android.content.pm.PermissionGroupInfo> getAllPermissionGroups(int);
method public abstract android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo);
method public abstract android.graphics.drawable.Drawable getApplicationBanner(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public abstract int getApplicationEnabledSetting(java.lang.String);
method public abstract android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo);
method public abstract android.graphics.drawable.Drawable getApplicationIcon(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
@ -24072,12 +24080,16 @@ package android.test.mock {
method public void clearPackagePreferredActivities(java.lang.String);
method public java.lang.String[] currentToCanonicalPackageNames(java.lang.String[]);
method public void extendVerificationTimeout(int, int, long);
method public android.graphics.drawable.Drawable getActivityBanner(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityBanner(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityIcon(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityIcon(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.content.pm.ActivityInfo getActivityInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityLogo(android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
method public android.graphics.drawable.Drawable getActivityLogo(android.content.Intent) throws android.content.pm.PackageManager.NameNotFoundException;
method public java.util.List<android.content.pm.PermissionGroupInfo> getAllPermissionGroups(int);
method public android.graphics.drawable.Drawable getApplicationBanner(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationBanner(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public int getApplicationEnabledSetting(java.lang.String);
method public android.graphics.drawable.Drawable getApplicationIcon(android.content.pm.ApplicationInfo);
method public android.graphics.drawable.Drawable getApplicationIcon(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;

View File

@ -728,6 +728,39 @@ final class ApplicationPackageManager extends PackageManager {
return getApplicationIcon(getApplicationInfo(packageName, 0));
}
@Override
public Drawable getActivityBanner(ComponentName activityName)
throws NameNotFoundException {
return getActivityInfo(activityName, 0).loadBanner(this);
}
@Override
public Drawable getActivityBanner(Intent intent)
throws NameNotFoundException {
if (intent.getComponent() != null) {
return getActivityBanner(intent.getComponent());
}
ResolveInfo info = resolveActivity(
intent, PackageManager.MATCH_DEFAULT_ONLY);
if (info != null) {
return info.activityInfo.loadBanner(this);
}
throw new NameNotFoundException(intent.toUri(0));
}
@Override
public Drawable getApplicationBanner(ApplicationInfo info) {
return info.loadBanner(this);
}
@Override
public Drawable getApplicationBanner(String packageName)
throws NameNotFoundException {
return getApplicationBanner(getApplicationInfo(packageName, 0));
}
@Override
public Drawable getActivityLogo(ComponentName activityName)
throws NameNotFoundException {

View File

@ -128,6 +128,17 @@ public class ComponentInfo extends PackageItemInfo {
return logo != 0 ? logo : applicationInfo.logo;
}
/**
* Return the banner resource identifier to use for this component. If the
* component defines a banner, that is used; else, the application banner is
* used.
*
* @return The banner associated with this component.
*/
public final int getBannerResource() {
return banner != 0 ? banner : applicationInfo.banner;
}
protected void dumpFront(Printer pw, String prefix) {
super.dumpFront(pw, prefix);
pw.println(prefix + "enabled=" + enabled + " exported=" + exported
@ -172,6 +183,13 @@ public class ComponentInfo extends PackageItemInfo {
return applicationInfo.loadIcon(pm);
}
/**
* @hide
*/
@Override protected Drawable loadDefaultBanner(PackageManager pm) {
return applicationInfo.loadBanner(pm);
}
/**
* @hide
*/

View File

@ -66,6 +66,12 @@ public class PackageItemInfo {
*/
public int icon;
/**
* A drawable resource identifier (in the package's resources) of this
* component's banner. From the "banner" attribute or, if not set, 0.
*/
public int banner;
/**
* A drawable resource identifier (in the package's resources) of this
* component's logo. Logos may be larger/wider than icons and are
@ -92,6 +98,7 @@ public class PackageItemInfo {
nonLocalizedLabel = orig.nonLocalizedLabel;
if (nonLocalizedLabel != null) nonLocalizedLabel = nonLocalizedLabel.toString().trim();
icon = orig.icon;
banner = orig.banner;
logo = orig.logo;
metaData = orig.metaData;
}
@ -145,6 +152,27 @@ public class PackageItemInfo {
return loadDefaultIcon(pm);
}
/**
* Retrieve the current graphical banner associated with this item. This
* will call back on the given PackageManager to load the banner from
* the application.
*
* @param pm A PackageManager from which the banner can be loaded; usually
* the PackageManager from which you originally retrieved this item.
*
* @return Returns a Drawable containing the item's banner. If the item
* does not have a banner, this method will return null.
*/
public Drawable loadBanner(PackageManager pm) {
if (banner != 0) {
Drawable dr = pm.getDrawable(packageName, banner, getApplicationInfo());
if (dr != null) {
return dr;
}
}
return loadDefaultBanner(pm);
}
/**
* Retrieve the default graphical icon associated with this item.
*
@ -159,7 +187,22 @@ public class PackageItemInfo {
protected Drawable loadDefaultIcon(PackageManager pm) {
return pm.getDefaultActivityIcon();
}
/**
* Retrieve the default graphical banner associated with this item.
*
* @param pm A PackageManager from which the banner can be loaded; usually
* the PackageManager from which you originally retrieved this item.
*
* @return Returns a Drawable containing the item's default banner
* or null if no default logo is available.
*
* @hide
*/
protected Drawable loadDefaultBanner(PackageManager pm) {
return null;
}
/**
* Retrieve the current graphical logo associated with this item. This
* will call back on the given PackageManager to load the logo from
@ -224,10 +267,11 @@ public class PackageItemInfo {
pw.println(prefix + "name=" + name);
}
pw.println(prefix + "packageName=" + packageName);
if (labelRes != 0 || nonLocalizedLabel != null || icon != 0) {
if (labelRes != 0 || nonLocalizedLabel != null || icon != 0 || banner != 0) {
pw.println(prefix + "labelRes=0x" + Integer.toHexString(labelRes)
+ " nonLocalizedLabel=" + nonLocalizedLabel
+ " icon=0x" + Integer.toHexString(icon));
+ " icon=0x" + Integer.toHexString(icon)
+ " banner=0x" + Integer.toHexString(banner));
}
}
@ -243,6 +287,7 @@ public class PackageItemInfo {
dest.writeInt(icon);
dest.writeInt(logo);
dest.writeBundle(metaData);
dest.writeInt(banner);
}
protected PackageItemInfo(Parcel source) {
@ -254,6 +299,7 @@ public class PackageItemInfo {
icon = source.readInt();
logo = source.readInt();
metaData = source.readBundle();
banner = source.readInt();
}
/**

View File

@ -2391,10 +2391,44 @@ public abstract class PackageManager {
public abstract Drawable getActivityIcon(Intent intent)
throws NameNotFoundException;
/**
* Retrieve the banner associated with an activity. Given the full name of
* an activity, retrieves the information about it and calls
* {@link ComponentInfo#loadIcon ComponentInfo.loadIcon()} to return its
* banner. If the activity cannot be found, NameNotFoundException is thrown.
*
* @param activityName Name of the activity whose banner is to be retrieved.
* @return Returns the image of the banner, or null if the activity has no
* banner specified.
* @throws NameNotFoundException Thrown if the resources for the given
* activity could not be loaded.
* @see #getActivityBanner(Intent)
*/
public abstract Drawable getActivityBanner(ComponentName activityName)
throws NameNotFoundException;
/**
* Retrieve the banner associated with an Intent. If intent.getClassName()
* is set, this simply returns the result of
* getActivityBanner(intent.getClassName()). Otherwise it resolves the
* intent's component and returns the banner associated with the resolved
* component. If intent.getClassName() cannot be found or the Intent cannot
* be resolved to a component, NameNotFoundException is thrown.
*
* @param intent The intent for which you would like to retrieve a banner.
* @return Returns the image of the banner, or null if the activity has no
* banner specified.
* @throws NameNotFoundException Thrown if the resources for application
* matching the given intent could not be loaded.
* @see #getActivityBanner(ComponentName)
*/
public abstract Drawable getActivityBanner(Intent intent)
throws NameNotFoundException;
/**
* Return the generic icon for an activity that is used when no specific
* icon is defined.
*
*
* @return Drawable Image of the icon.
*/
public abstract Drawable getDefaultActivityIcon();
@ -2432,19 +2466,43 @@ public abstract class PackageManager {
throws NameNotFoundException;
/**
* Retrieve the logo associated with an activity. Given the full name of
* an activity, retrieves the information about it and calls
* {@link ComponentInfo#loadLogo ComponentInfo.loadLogo()} to return its logo.
* If the activity cannot be found, NameNotFoundException is thrown.
* Retrieve the banner associated with an application.
*
* @param info Information about application being queried.
* @return Returns the image of the banner or null if the application has no
* banner specified.
* @see #getApplicationBanner(String)
*/
public abstract Drawable getApplicationBanner(ApplicationInfo info);
/**
* Retrieve the banner associated with an application. Given the name of the
* application's package, retrieves the information about it and calls
* getApplicationIcon() to return its banner. If the application cannot be
* found, NameNotFoundException is thrown.
*
* @param packageName Name of the package whose application banner is to be
* retrieved.
* @return Returns the image of the banner or null if the application has no
* banner specified.
* @throws NameNotFoundException Thrown if the resources for the given
* application could not be loaded.
* @see #getApplicationBanner(ApplicationInfo)
*/
public abstract Drawable getApplicationBanner(String packageName)
throws NameNotFoundException;
/**
* Retrieve the logo associated with an activity. Given the full name of an
* activity, retrieves the information about it and calls
* {@link ComponentInfo#loadLogo ComponentInfo.loadLogo()} to return its
* logo. If the activity cannot be found, NameNotFoundException is thrown.
*
* @param activityName Name of the activity whose logo is to be retrieved.
*
* @return Returns the image of the logo or null if the activity has no
* logo specified.
*
* @return Returns the image of the logo or null if the activity has no logo
* specified.
* @throws NameNotFoundException Thrown if the resources for the given
* activity could not be loaded.
*
* activity could not be loaded.
* @see #getActivityLogo(Intent)
*/
public abstract Drawable getActivityLogo(ComponentName activityName)

View File

@ -167,18 +167,20 @@ public class PackageParser {
final int labelRes;
final int iconRes;
final int logoRes;
final int bannerRes;
String tag;
TypedArray sa;
ParsePackageItemArgs(Package _owner, String[] _outError,
int _nameRes, int _labelRes, int _iconRes, int _logoRes) {
int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes) {
owner = _owner;
outError = _outError;
nameRes = _nameRes;
labelRes = _labelRes;
iconRes = _iconRes;
logoRes = _logoRes;
bannerRes = _bannerRes;
}
}
@ -190,10 +192,10 @@ public class PackageParser {
int flags;
ParseComponentArgs(Package _owner, String[] _outError,
int _nameRes, int _labelRes, int _iconRes, int _logoRes,
int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes,
String[] _sepProcesses, int _processRes,
int _descriptionRes, int _enabledRes) {
super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes);
super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes, _bannerRes);
sepProcesses = _sepProcesses;
processRes = _processRes;
descriptionRes = _descriptionRes;
@ -1687,7 +1689,8 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestPermissionGroup_name,
com.android.internal.R.styleable.AndroidManifestPermissionGroup_label,
com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon,
com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo)) {
com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo,
com.android.internal.R.styleable.AndroidManifestPermissionGroup_banner)) {
sa.recycle();
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return null;
@ -1730,7 +1733,8 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestPermission_name,
com.android.internal.R.styleable.AndroidManifestPermission_label,
com.android.internal.R.styleable.AndroidManifestPermission_icon,
com.android.internal.R.styleable.AndroidManifestPermission_logo)) {
com.android.internal.R.styleable.AndroidManifestPermission_logo,
com.android.internal.R.styleable.AndroidManifestPermission_banner)) {
sa.recycle();
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return null;
@ -1799,7 +1803,8 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestPermissionTree_name,
com.android.internal.R.styleable.AndroidManifestPermissionTree_label,
com.android.internal.R.styleable.AndroidManifestPermissionTree_icon,
com.android.internal.R.styleable.AndroidManifestPermissionTree_logo)) {
com.android.internal.R.styleable.AndroidManifestPermissionTree_logo,
com.android.internal.R.styleable.AndroidManifestPermissionTree_banner)) {
sa.recycle();
mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
return null;
@ -1844,7 +1849,8 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestInstrumentation_name,
com.android.internal.R.styleable.AndroidManifestInstrumentation_label,
com.android.internal.R.styleable.AndroidManifestInstrumentation_icon,
com.android.internal.R.styleable.AndroidManifestInstrumentation_logo);
com.android.internal.R.styleable.AndroidManifestInstrumentation_logo,
com.android.internal.R.styleable.AndroidManifestInstrumentation_banner);
mParseInstrumentationArgs.tag = "<instrumentation>";
}
@ -1960,6 +1966,8 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestApplication_icon, 0);
ai.logo = sa.getResourceId(
com.android.internal.R.styleable.AndroidManifestApplication_logo, 0);
ai.banner = sa.getResourceId(
com.android.internal.R.styleable.AndroidManifestApplication_banner, 0);
ai.theme = sa.getResourceId(
com.android.internal.R.styleable.AndroidManifestApplication_theme, 0);
ai.descriptionRes = sa.getResourceId(
@ -2253,7 +2261,7 @@ public class PackageParser {
private boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo,
String[] outError, String tag, TypedArray sa,
int nameRes, int labelRes, int iconRes, int logoRes) {
int nameRes, int labelRes, int iconRes, int logoRes, int bannerRes) {
String name = sa.getNonConfigurationString(nameRes, 0);
if (name == null) {
outError[0] = tag + " does not specify android:name";
@ -2277,6 +2285,11 @@ public class PackageParser {
outInfo.logo = logoVal;
}
int bannerVal = sa.getResourceId(bannerRes, 0);
if (bannerVal != 0) {
outInfo.banner = bannerVal;
}
TypedValue v = sa.peekValue(labelRes);
if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
outInfo.nonLocalizedLabel = v.coerceToString();
@ -2300,6 +2313,7 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestActivity_label,
com.android.internal.R.styleable.AndroidManifestActivity_icon,
com.android.internal.R.styleable.AndroidManifestActivity_logo,
com.android.internal.R.styleable.AndroidManifestActivity_banner,
mSeparateProcesses,
com.android.internal.R.styleable.AndroidManifestActivity_process,
com.android.internal.R.styleable.AndroidManifestActivity_description,
@ -2585,6 +2599,7 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestActivityAlias_label,
com.android.internal.R.styleable.AndroidManifestActivityAlias_icon,
com.android.internal.R.styleable.AndroidManifestActivityAlias_logo,
com.android.internal.R.styleable.AndroidManifestActivityAlias_banner,
mSeparateProcesses,
0,
com.android.internal.R.styleable.AndroidManifestActivityAlias_description,
@ -2619,6 +2634,7 @@ public class PackageParser {
info.flags = target.info.flags;
info.icon = target.info.icon;
info.logo = target.info.logo;
info.banner = target.info.banner;
info.labelRes = target.info.labelRes;
info.nonLocalizedLabel = target.info.nonLocalizedLabel;
info.launchMode = target.info.launchMode;
@ -2732,6 +2748,7 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestProvider_label,
com.android.internal.R.styleable.AndroidManifestProvider_icon,
com.android.internal.R.styleable.AndroidManifestProvider_logo,
com.android.internal.R.styleable.AndroidManifestProvider_banner,
mSeparateProcesses,
com.android.internal.R.styleable.AndroidManifestProvider_process,
com.android.internal.R.styleable.AndroidManifestProvider_description,
@ -3038,6 +3055,7 @@ public class PackageParser {
com.android.internal.R.styleable.AndroidManifestService_label,
com.android.internal.R.styleable.AndroidManifestService_icon,
com.android.internal.R.styleable.AndroidManifestService_logo,
com.android.internal.R.styleable.AndroidManifestService_banner,
mSeparateProcesses,
com.android.internal.R.styleable.AndroidManifestService_process,
com.android.internal.R.styleable.AndroidManifestService_description,
@ -3335,6 +3353,9 @@ public class PackageParser {
outInfo.logo = sa.getResourceId(
com.android.internal.R.styleable.AndroidManifestIntentFilter_logo, 0);
outInfo.banner = sa.getResourceId(
com.android.internal.R.styleable.AndroidManifestIntentFilter_banner, 0);
sa.recycle();
int outerDepth = parser.getDepth();
@ -3701,6 +3722,11 @@ public class PackageParser {
outInfo.logo = logoVal;
}
int bannerVal = args.sa.getResourceId(args.bannerRes, 0);
if (bannerVal != 0) {
outInfo.banner = bannerVal;
}
TypedValue v = args.sa.peekValue(args.labelRes);
if (v != null && (outInfo.labelRes=v.resourceId) == 0) {
outInfo.nonLocalizedLabel = v.coerceToString();
@ -4125,6 +4151,7 @@ public class PackageParser {
public CharSequence nonLocalizedLabel;
public int icon;
public int logo;
public int banner;
public int preferred;
}

View File

@ -62,6 +62,21 @@
a reference to a Drawable resource containing the image definition. -->
<attr name="icon" format="reference" />
<!-- A Drawable resource providing an extended graphical banner for its
associated item. Use with the application tag (to supply a default
banner for all application activities), or with the activity, tag to
supply a banner for a specific activity.
<p>The given banner will be used to display to the user a graphical
representation of an activity in the Leanback application launcher.
Since banners are displayed only in the Leanback launcher, they should
only be used with activities (and applications) that support Leanback
mode. These are activities that handle Intents of category
{@link android.content.Intent#CATEGORY_LEANBACK_LAUNCHER
Intent.CATEGORY_LEANBACK_LAUNCHER}.
<p>This must be a reference to a Drawable resource containing the image definition. -->
<attr name="banner" format="reference" />
<!-- A Drawable resource providing an extended graphical logo for its
associated item. Use with the application tag (to supply a default
logo for all application components), or with the activity, receiver,
@ -888,6 +903,7 @@
<attr name="theme" />
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="description" />
<attr name="permission" />
@ -970,6 +986,7 @@
<attr name="name" />
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="permissionGroup" />
<attr name="description" />
@ -996,6 +1013,7 @@
<attr name="name" />
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="description" />
<attr name="permissionGroupFlags" />
@ -1028,6 +1046,7 @@
<attr name="name" />
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
</declare-styleable>
@ -1294,6 +1313,7 @@
<attr name="label" />
<attr name="description" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="process" />
<attr name="authorities" />
@ -1375,6 +1395,7 @@
<attr name="label" />
<attr name="description" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="permission" />
<attr name="process" />
@ -1417,6 +1438,7 @@
<attr name="label" />
<attr name="description" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="permission" />
<attr name="process" />
@ -1451,6 +1473,7 @@
<attr name="label" />
<attr name="description" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="launchMode" />
<attr name="screenOrientation" />
@ -1514,6 +1537,7 @@
<attr name="label" />
<attr name="description" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="permission" />
<!-- Specify whether the activity-alias is enabled or not (that is, can be instantiated by the system).
@ -1585,6 +1609,7 @@
parent="AndroidManifestActivity AndroidManifestReceiver AndroidManifestService">
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="priority" />
</declare-styleable>
@ -1713,6 +1738,7 @@
<attr name="targetPackage" />
<attr name="label" />
<attr name="icon" />
<attr name="banner" />
<attr name="logo" />
<attr name="handleProfiling" />
<attr name="functionalTest" />

View File

@ -2087,4 +2087,10 @@
<public type="style" name="Theme.DeviceDefault.NoActionBar.TranslucentDecor" id="0x010301e3" />
<public type="style" name="Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor" id="0x010301e4" />
<!-- ===============================================================
Resources added in version 20 of the platform
=============================================================== -->
<eat-comment />
<public type="attr" name="banner" id="0x10103f2" />
</resources>

View File

@ -337,6 +337,27 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
@Override
public Drawable getActivityBanner(ComponentName activityName)
throws NameNotFoundException {
throw new UnsupportedOperationException();
}
@Override
public Drawable getActivityBanner(Intent intent) throws NameNotFoundException {
throw new UnsupportedOperationException();
}
@Override
public Drawable getApplicationBanner(ApplicationInfo info) {
throw new UnsupportedOperationException();
}
@Override
public Drawable getApplicationBanner(String packageName) throws NameNotFoundException {
throw new UnsupportedOperationException();
}
@Override
public Drawable getApplicationIcon(ApplicationInfo info) {
throw new UnsupportedOperationException();