Loading core/java/android/content/pm/LauncherApps.java +3 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,9 @@ public class LauncherApps { */ public void startActivityForProfile(ComponentName component, Rect sourceBounds, Bundle opts, UserHandle user) { if (DEBUG) { Log.i(TAG, "StartActivityForProfile " + component + " " + user.getIdentifier()); } try { mService.startActivityAsUser(component, sourceBounds, opts, user); } catch (RemoteException re) { Loading core/java/android/os/UserManager.java +6 −7 Original line number Diff line number Diff line Loading @@ -524,15 +524,14 @@ public class UserManager { private int getBadgeResIdForUser(int userHandle) { // Return the framework-provided badge. if (userHandle == UserHandle.myUserId()) { UserInfo user = getUserInfo(userHandle); /* TODO: Allow managed profiles for other users in the future */ if (!user.isManagedProfile() || user.profileGroupId != getUserInfo(UserHandle.USER_OWNER).profileGroupId) { return 0; List<UserInfo> userProfiles = getProfiles(UserHandle.myUserId()); for (UserInfo user : userProfiles) { if (user.id == userHandle && user.isManagedProfile()) { return com.android.internal.R.drawable.ic_corp_badge; } } return com.android.internal.R.drawable.ic_corp_badge; return 0; } private Drawable getMergedDrawable(Drawable icon, Drawable badge) { Loading Loading
core/java/android/content/pm/LauncherApps.java +3 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,9 @@ public class LauncherApps { */ public void startActivityForProfile(ComponentName component, Rect sourceBounds, Bundle opts, UserHandle user) { if (DEBUG) { Log.i(TAG, "StartActivityForProfile " + component + " " + user.getIdentifier()); } try { mService.startActivityAsUser(component, sourceBounds, opts, user); } catch (RemoteException re) { Loading
core/java/android/os/UserManager.java +6 −7 Original line number Diff line number Diff line Loading @@ -524,15 +524,14 @@ public class UserManager { private int getBadgeResIdForUser(int userHandle) { // Return the framework-provided badge. if (userHandle == UserHandle.myUserId()) { UserInfo user = getUserInfo(userHandle); /* TODO: Allow managed profiles for other users in the future */ if (!user.isManagedProfile() || user.profileGroupId != getUserInfo(UserHandle.USER_OWNER).profileGroupId) { return 0; List<UserInfo> userProfiles = getProfiles(UserHandle.myUserId()); for (UserInfo user : userProfiles) { if (user.id == userHandle && user.isManagedProfile()) { return com.android.internal.R.drawable.ic_corp_badge; } } return com.android.internal.R.drawable.ic_corp_badge; return 0; } private Drawable getMergedDrawable(Drawable icon, Drawable badge) { Loading