Loading core/java/android/app/ApplicationPackageManager.java +4 −16 Original line number Diff line number Diff line Loading @@ -1092,14 +1092,6 @@ public class ApplicationPackageManager extends PackageManager { return getApplicationLogo(getApplicationInfo(packageName, sDefaultFlags)); } @Override public Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity) { Drawable badgeDrawable = getDrawableForDensity(badgeDensity, com.android.internal.R.drawable.ic_corp_badge); return getBadgedDrawable(drawable, badgeDrawable, badgeLocation, true); } @Override public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { final int badgeResId = getBadgeResIdForUser(user.getIdentifier()); Loading Loading @@ -1132,18 +1124,14 @@ public class ApplicationPackageManager extends PackageManager { com.android.internal.R.drawable.ic_corp_badge_no_background); } private Drawable getDrawableForDensity(int density, int drawableId) { if (density <= 0) { density = mContext.getResources().getDisplayMetrics().densityDpi; } return Resources.getSystem().getDrawableForDensity(drawableId, density); } private Drawable getManagedProfileIconForDensity(UserHandle user, int density, int drawableId) { UserInfo userInfo = getUserIfProfile(user.getIdentifier()); if (userInfo != null && userInfo.isManagedProfile()) { return getDrawableForDensity(density, drawableId); if (density <= 0) { density = mContext.getResources().getDisplayMetrics().densityDpi; } return Resources.getSystem().getDrawableForDensity(drawableId, density); } return null; } Loading core/java/android/content/pm/PackageManager.java +0 −26 Original line number Diff line number Diff line Loading @@ -4338,32 +4338,6 @@ public abstract class PackageManager { public abstract Drawable getApplicationLogo(String packageName) throws NameNotFoundException; /** * Returns a managed-user-style badged copy of the given drawable allowing the user to * distinguish it from the original drawable. * The caller can specify the location in the bounds of the drawable to be * badged where the badge should be applied as well as the density of the * badge to be used. * <p> * If the original drawable is a BitmapDrawable and the backing bitmap is * mutable as per {@link android.graphics.Bitmap#isMutable()}, the bading * is performed in place and the original drawable is returned. * </p> * * @param drawable The drawable to badge. * @param badgeLocation Where in the bounds of the badged drawable to place * the badge. If not provided, the badge is applied on top of the entire * drawable being badged. * @param badgeDensity The optional desired density for the badge as per * {@link android.util.DisplayMetrics#densityDpi}. If not provided, * the density of the display is used. * @return A drawable that combines the original drawable and a badge as * determined by the system. * @hide */ public abstract Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity); /** * If the target user is a managed profile of the calling user or if the * target user is the caller and is itself a managed profile, then this Loading test-runner/src/android/test/mock/MockPackageManager.java +0 −8 Original line number Diff line number Diff line Loading @@ -518,14 +518,6 @@ public class MockPackageManager extends PackageManager { throw new UnsupportedOperationException(); } /** @hide */ @Override public Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity) { throw new UnsupportedOperationException(); } @Override public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { throw new UnsupportedOperationException(); Loading Loading
core/java/android/app/ApplicationPackageManager.java +4 −16 Original line number Diff line number Diff line Loading @@ -1092,14 +1092,6 @@ public class ApplicationPackageManager extends PackageManager { return getApplicationLogo(getApplicationInfo(packageName, sDefaultFlags)); } @Override public Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity) { Drawable badgeDrawable = getDrawableForDensity(badgeDensity, com.android.internal.R.drawable.ic_corp_badge); return getBadgedDrawable(drawable, badgeDrawable, badgeLocation, true); } @Override public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { final int badgeResId = getBadgeResIdForUser(user.getIdentifier()); Loading Loading @@ -1132,18 +1124,14 @@ public class ApplicationPackageManager extends PackageManager { com.android.internal.R.drawable.ic_corp_badge_no_background); } private Drawable getDrawableForDensity(int density, int drawableId) { if (density <= 0) { density = mContext.getResources().getDisplayMetrics().densityDpi; } return Resources.getSystem().getDrawableForDensity(drawableId, density); } private Drawable getManagedProfileIconForDensity(UserHandle user, int density, int drawableId) { UserInfo userInfo = getUserIfProfile(user.getIdentifier()); if (userInfo != null && userInfo.isManagedProfile()) { return getDrawableForDensity(density, drawableId); if (density <= 0) { density = mContext.getResources().getDisplayMetrics().densityDpi; } return Resources.getSystem().getDrawableForDensity(drawableId, density); } return null; } Loading
core/java/android/content/pm/PackageManager.java +0 −26 Original line number Diff line number Diff line Loading @@ -4338,32 +4338,6 @@ public abstract class PackageManager { public abstract Drawable getApplicationLogo(String packageName) throws NameNotFoundException; /** * Returns a managed-user-style badged copy of the given drawable allowing the user to * distinguish it from the original drawable. * The caller can specify the location in the bounds of the drawable to be * badged where the badge should be applied as well as the density of the * badge to be used. * <p> * If the original drawable is a BitmapDrawable and the backing bitmap is * mutable as per {@link android.graphics.Bitmap#isMutable()}, the bading * is performed in place and the original drawable is returned. * </p> * * @param drawable The drawable to badge. * @param badgeLocation Where in the bounds of the badged drawable to place * the badge. If not provided, the badge is applied on top of the entire * drawable being badged. * @param badgeDensity The optional desired density for the badge as per * {@link android.util.DisplayMetrics#densityDpi}. If not provided, * the density of the display is used. * @return A drawable that combines the original drawable and a badge as * determined by the system. * @hide */ public abstract Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity); /** * If the target user is a managed profile of the calling user or if the * target user is the caller and is itself a managed profile, then this Loading
test-runner/src/android/test/mock/MockPackageManager.java +0 −8 Original line number Diff line number Diff line Loading @@ -518,14 +518,6 @@ public class MockPackageManager extends PackageManager { throw new UnsupportedOperationException(); } /** @hide */ @Override public Drawable getManagedUserBadgedDrawableForDensity(Drawable drawable, Rect badgeLocation, int badgeDensity) { throw new UnsupportedOperationException(); } @Override public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) { throw new UnsupportedOperationException(); Loading