summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ApplicationPackageManager.java
diff options
context:
space:
mode:
authorJose Lima <joselima@google.com>2014-03-06 12:13:15 -0800
committerJose Lima <joselima@google.com>2014-03-12 18:07:38 -0700
commitf78e312db2aa7653ddc021e7dc58ce48f95ba047 (patch)
tree07941001d36f2239dc9e283c1eeec126282ab64f /core/java/android/app/ApplicationPackageManager.java
parentd23d916e0fc573ccde8a622aaa42ccfae9d31f82 (diff)
downloadframeworks_base-f78e312db2aa7653ddc021e7dc58ce48f95ba047.zip
frameworks_base-f78e312db2aa7653ddc021e7dc58ce48f95ba047.tar.gz
frameworks_base-f78e312db2aa7653ddc021e7dc58ce48f95ba047.tar.bz2
Add banner attribute to app manifest
Change-Id: I28b0dc6dee9623ec7534bb0e741b88f439b48c9f
Diffstat (limited to 'core/java/android/app/ApplicationPackageManager.java')
-rw-r--r--core/java/android/app/ApplicationPackageManager.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index b505d4f..6f53df4 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -729,6 +729,39 @@ final class ApplicationPackageManager extends PackageManager {
}
@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 {
return getActivityInfo(activityName, 0).loadLogo(this);