Loading core/java/android/content/pm/ActivityInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import java.util.Set; * from the AndroidManifest.xml's <activity> and * <receiver> tags. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ActivityInfo extends ComponentInfo implements Parcelable { private static final Parcelling.BuiltIn.ForStringSet sForStringSet = Loading core/java/android/content/pm/ApplicationInfo.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.UUID; * corresponds to information collected from the AndroidManifest.xml's * <application> tag. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ApplicationInfo extends PackageItemInfo implements Parcelable { private static final ForBoolean sForBoolean = Parcelling.Cache.getOrCreate(ForBoolean.class); private static final Parcelling.BuiltIn.ForStringSet sForStringSet = Loading Loading @@ -1386,6 +1387,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * * @see #category */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public static CharSequence getCategoryTitle(Context context, @Category int category) { switch (category) { case ApplicationInfo.CATEGORY_GAME: Loading Loading @@ -2187,6 +2189,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @return Returns a CharSequence containing the application's description. * If there is no description, null is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public CharSequence loadDescription(PackageManager pm) { if (descriptionRes != 0) { CharSequence label = pm.getText(packageName, descriptionRes, this); Loading Loading @@ -2222,6 +2225,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } /** {@hide} */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = Environment.class) public void initForUser(int userId) { uid = UserHandle.getUid(userId, UserHandle.getAppId(uid)); Loading Loading @@ -2414,6 +2418,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { if ((flags & FLAG_EXTERNAL_STORAGE) != 0 && isPackageUnavailable(pm)) { Loading @@ -2424,6 +2429,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) @android.ravenwood.annotation.RavenwoodThrow(blockedBy = PackageManager.class) private boolean isPackageUnavailable(PackageManager pm) { try { return pm.getPackageInfo(packageName, 0) == null; Loading core/java/android/content/pm/ComponentInfo.java +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.util.Printer; * implement Parcelable, but does provide convenience methods to assist * in the implementation of Parcelable in subclasses. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ComponentInfo extends PackageItemInfo { /** * Global information about the application/package this component is a Loading Loading @@ -258,6 +259,7 @@ public class ComponentInfo extends PackageItemInfo { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { return applicationInfo.loadIcon(pm); } Loading @@ -265,6 +267,7 @@ public class ComponentInfo extends PackageItemInfo { /** * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) @Override protected Drawable loadDefaultBanner(PackageManager pm) { return applicationInfo.loadBanner(pm); } Loading @@ -273,6 +276,7 @@ public class ComponentInfo extends PackageItemInfo { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultLogo(PackageManager pm) { return applicationInfo.loadLogo(pm); } Loading core/java/android/content/pm/PackageInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.os.Parcelable; * Overall information about the contents of a package. This corresponds * to all of the information collected from AndroidManifest.xml. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class PackageInfo implements Parcelable { /** * The name of this package. From the <manifest> tag's "name" Loading core/java/android/content/pm/PackageItemInfo.java +13 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import java.util.Objects; * itself implement Parcelable, but does provide convenience methods to assist * in the implementation of Parcelable in subclasses. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class PackageItemInfo { /** Loading Loading @@ -214,6 +215,7 @@ public class PackageItemInfo { * @return Returns a CharSequence containing the item's label. If the * item does not have a label, its name is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadLabel(@NonNull PackageManager pm) { if (sForceSafeLabels && !Objects.equals(packageName, ActivityThread.currentPackageName())) { return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM Loading @@ -226,6 +228,7 @@ public class PackageItemInfo { } /** {@hide} */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public CharSequence loadUnsafeLabel(PackageManager pm) { if (nonLocalizedLabel != null) { return nonLocalizedLabel; Loading @@ -248,6 +251,7 @@ public class PackageItemInfo { */ @SystemApi @Deprecated @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM | SAFE_STRING_FLAG_FIRST_LINE); Loading @@ -261,6 +265,7 @@ public class PackageItemInfo { * @hide */ @SystemApi @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm, @FloatRange(from = 0) float ellipsizeDip, @TextUtils.SafeStringFlags int flags) { Objects.requireNonNull(pm); Loading @@ -281,6 +286,7 @@ public class PackageItemInfo { * item does not have an icon, the item's default icon is returned * such as the default activity icon. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadIcon(PackageManager pm) { return pm.loadItemIcon(this, getApplicationInfo()); } Loading @@ -298,6 +304,7 @@ public class PackageItemInfo { * item does not have an icon, the item's default icon is returned * such as the default activity icon. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadUnbadgedIcon(PackageManager pm) { return pm.loadUnbadgedItemIcon(this, getApplicationInfo()); } Loading @@ -313,6 +320,7 @@ public class PackageItemInfo { * @return Returns a Drawable containing the item's banner. If the item * does not have a banner, this method will return null. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadBanner(PackageManager pm) { if (banner != 0) { Drawable dr = pm.getDrawable(packageName, banner, getApplicationInfo()); Loading @@ -334,6 +342,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { return pm.getDefaultActivityIcon(); } Loading @@ -349,6 +358,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultBanner(PackageManager pm) { return null; } Loading @@ -364,6 +374,7 @@ public class PackageItemInfo { * @return Returns a Drawable containing the item's logo. If the item * does not have a logo, this method will return null. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadLogo(PackageManager pm) { if (logo != 0) { Drawable d = pm.getDrawable(packageName, logo, getApplicationInfo()); Loading @@ -385,6 +396,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultLogo(PackageManager pm) { return null; } Loading @@ -402,6 +414,7 @@ public class PackageItemInfo { * assigned as the given meta-data. If the meta-data name is not defined * or the XML resource could not be found, null is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public XmlResourceParser loadXmlMetaData(PackageManager pm, String name) { if (metaData != null) { int resid = metaData.getInt(name); Loading Loading
core/java/android/content/pm/ActivityInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import java.util.Set; * from the AndroidManifest.xml's <activity> and * <receiver> tags. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ActivityInfo extends ComponentInfo implements Parcelable { private static final Parcelling.BuiltIn.ForStringSet sForStringSet = Loading
core/java/android/content/pm/ApplicationInfo.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.UUID; * corresponds to information collected from the AndroidManifest.xml's * <application> tag. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ApplicationInfo extends PackageItemInfo implements Parcelable { private static final ForBoolean sForBoolean = Parcelling.Cache.getOrCreate(ForBoolean.class); private static final Parcelling.BuiltIn.ForStringSet sForStringSet = Loading Loading @@ -1386,6 +1387,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * * @see #category */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public static CharSequence getCategoryTitle(Context context, @Category int category) { switch (category) { case ApplicationInfo.CATEGORY_GAME: Loading Loading @@ -2187,6 +2189,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @return Returns a CharSequence containing the application's description. * If there is no description, null is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public CharSequence loadDescription(PackageManager pm) { if (descriptionRes != 0) { CharSequence label = pm.getText(packageName, descriptionRes, this); Loading Loading @@ -2222,6 +2225,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } /** {@hide} */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = Environment.class) public void initForUser(int userId) { uid = UserHandle.getUid(userId, UserHandle.getAppId(uid)); Loading Loading @@ -2414,6 +2418,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { if ((flags & FLAG_EXTERNAL_STORAGE) != 0 && isPackageUnavailable(pm)) { Loading @@ -2424,6 +2429,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) @android.ravenwood.annotation.RavenwoodThrow(blockedBy = PackageManager.class) private boolean isPackageUnavailable(PackageManager pm) { try { return pm.getPackageInfo(packageName, 0) == null; Loading
core/java/android/content/pm/ComponentInfo.java +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.util.Printer; * implement Parcelable, but does provide convenience methods to assist * in the implementation of Parcelable in subclasses. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class ComponentInfo extends PackageItemInfo { /** * Global information about the application/package this component is a Loading Loading @@ -258,6 +259,7 @@ public class ComponentInfo extends PackageItemInfo { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { return applicationInfo.loadIcon(pm); } Loading @@ -265,6 +267,7 @@ public class ComponentInfo extends PackageItemInfo { /** * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) @Override protected Drawable loadDefaultBanner(PackageManager pm) { return applicationInfo.loadBanner(pm); } Loading @@ -273,6 +276,7 @@ public class ComponentInfo extends PackageItemInfo { * @hide */ @Override @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultLogo(PackageManager pm) { return applicationInfo.loadLogo(pm); } Loading
core/java/android/content/pm/PackageInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.os.Parcelable; * Overall information about the contents of a package. This corresponds * to all of the information collected from AndroidManifest.xml. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class PackageInfo implements Parcelable { /** * The name of this package. From the <manifest> tag's "name" Loading
core/java/android/content/pm/PackageItemInfo.java +13 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import java.util.Objects; * itself implement Parcelable, but does provide convenience methods to assist * in the implementation of Parcelable in subclasses. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class PackageItemInfo { /** Loading Loading @@ -214,6 +215,7 @@ public class PackageItemInfo { * @return Returns a CharSequence containing the item's label. If the * item does not have a label, its name is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadLabel(@NonNull PackageManager pm) { if (sForceSafeLabels && !Objects.equals(packageName, ActivityThread.currentPackageName())) { return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM Loading @@ -226,6 +228,7 @@ public class PackageItemInfo { } /** {@hide} */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public CharSequence loadUnsafeLabel(PackageManager pm) { if (nonLocalizedLabel != null) { return nonLocalizedLabel; Loading @@ -248,6 +251,7 @@ public class PackageItemInfo { */ @SystemApi @Deprecated @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm) { return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM | SAFE_STRING_FLAG_FIRST_LINE); Loading @@ -261,6 +265,7 @@ public class PackageItemInfo { * @hide */ @SystemApi @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public @NonNull CharSequence loadSafeLabel(@NonNull PackageManager pm, @FloatRange(from = 0) float ellipsizeDip, @TextUtils.SafeStringFlags int flags) { Objects.requireNonNull(pm); Loading @@ -281,6 +286,7 @@ public class PackageItemInfo { * item does not have an icon, the item's default icon is returned * such as the default activity icon. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadIcon(PackageManager pm) { return pm.loadItemIcon(this, getApplicationInfo()); } Loading @@ -298,6 +304,7 @@ public class PackageItemInfo { * item does not have an icon, the item's default icon is returned * such as the default activity icon. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadUnbadgedIcon(PackageManager pm) { return pm.loadUnbadgedItemIcon(this, getApplicationInfo()); } Loading @@ -313,6 +320,7 @@ public class PackageItemInfo { * @return Returns a Drawable containing the item's banner. If the item * does not have a banner, this method will return null. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadBanner(PackageManager pm) { if (banner != 0) { Drawable dr = pm.getDrawable(packageName, banner, getApplicationInfo()); Loading @@ -334,6 +342,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadDefaultIcon(PackageManager pm) { return pm.getDefaultActivityIcon(); } Loading @@ -349,6 +358,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultBanner(PackageManager pm) { return null; } Loading @@ -364,6 +374,7 @@ public class PackageItemInfo { * @return Returns a Drawable containing the item's logo. If the item * does not have a logo, this method will return null. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public Drawable loadLogo(PackageManager pm) { if (logo != 0) { Drawable d = pm.getDrawable(packageName, logo, getApplicationInfo()); Loading @@ -385,6 +396,7 @@ public class PackageItemInfo { * * @hide */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) protected Drawable loadDefaultLogo(PackageManager pm) { return null; } Loading @@ -402,6 +414,7 @@ public class PackageItemInfo { * assigned as the given meta-data. If the meta-data name is not defined * or the XML resource could not be found, null is returned. */ @android.ravenwood.annotation.RavenwoodThrow(blockedBy = android.content.res.Resources.class) public XmlResourceParser loadXmlMetaData(PackageManager pm, String name) { if (metaData != null) { int resid = metaData.getInt(name); Loading