Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -19978,6 +19978,7 @@ package android.os { public class UserManager { method public android.os.Bundle getApplicationRestrictions(java.lang.String); method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle); method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long); core/java/android/os/UserManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,20 @@ public class UserManager { return profiles; } /** @hide */ /** * If the target user is a managed profile of the calling user or the caller * is itself a managed profile, then this returns a badged copy of the given * icon to be able to distinguish it from the original icon. * <P> * If the original drawable is not a BitmapDrawable, then the original * drawable is returned. * </P> * * @param icon The icon to badge. * @param user The target user. * @return A drawable that combines the original icon and a badge as * determined by the system. */ public Drawable getBadgedDrawableForUser(Drawable icon, UserHandle user) { int badgeResId = getBadgeResIdForUser(user.getIdentifier()); if (badgeResId == 0) { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -19978,6 +19978,7 @@ package android.os { public class UserManager { method public android.os.Bundle getApplicationRestrictions(java.lang.String); method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle); method public long getSerialNumberForUser(android.os.UserHandle); method public int getUserCount(); method public android.os.UserHandle getUserForSerialNumber(long);
core/java/android/os/UserManager.java +14 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,20 @@ public class UserManager { return profiles; } /** @hide */ /** * If the target user is a managed profile of the calling user or the caller * is itself a managed profile, then this returns a badged copy of the given * icon to be able to distinguish it from the original icon. * <P> * If the original drawable is not a BitmapDrawable, then the original * drawable is returned. * </P> * * @param icon The icon to badge. * @param user The target user. * @return A drawable that combines the original icon and a badge as * determined by the system. */ public Drawable getBadgedDrawableForUser(Drawable icon, UserHandle user) { int badgeResId = getBadgeResIdForUser(user.getIdentifier()); if (badgeResId == 0) { Loading