Show the icon of the personal space.
In an intent disambiguation dialog from a managed profile,
when the intent can be forwarded to the personal space:
show the icon of the parent next to "Personal apps".
And put it at the bottom of the dialog.
Change-Id: I523222aac5dde9653e784eb26cf23cdaf018b86c
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 1839259..a0cb098 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -412,13 +412,17 @@
@Override
public Bitmap getUserIcon(int userId) {
- checkManageUsersPermission("read users");
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
if (info == null || info.partial) {
Slog.w(LOG_TAG, "getUserIcon: unknown user #" + userId);
return null;
}
+ int callingGroupId = mUsers.get(UserHandle.getCallingUserId()).profileGroupId;
+ if (callingGroupId == UserInfo.NO_PROFILE_GROUP_ID
+ || callingGroupId != info.profileGroupId) {
+ checkManageUsersPermission("get the icon of a user who is not related");
+ }
if (info.iconPath == null) {
return null;
}