Loading services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class UserManagerService extends IUserManager.Stub { return null; } int parentUserId = profile.profileGroupId; if (parentUserId == UserInfo.NO_PROFILE_GROUP_ID) { if (parentUserId == userHandle || parentUserId == UserInfo.NO_PROFILE_GROUP_ID) { return null; } else { return getUserInfoLU(parentUserId); Loading services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -177,10 +177,12 @@ public class UserManagerTest extends AndroidTestCase { UserInfo userInfo = createProfileForUser("Profile", UserInfo.FLAG_MANAGED_PROFILE, primaryUserId); assertNotNull(userInfo); assertNull(mUserManager.getProfileParent(primaryUserId)); UserInfo parentProfileInfo = mUserManager.getProfileParent(userInfo.id); assertNotNull(parentProfileInfo); assertEquals(parentProfileInfo.id, primaryUserId); removeUser(userInfo.id); assertNull(mUserManager.getProfileParent(primaryUserId)); } // Make sure only one managed profile can be created Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class UserManagerService extends IUserManager.Stub { return null; } int parentUserId = profile.profileGroupId; if (parentUserId == UserInfo.NO_PROFILE_GROUP_ID) { if (parentUserId == userHandle || parentUserId == UserInfo.NO_PROFILE_GROUP_ID) { return null; } else { return getUserInfoLU(parentUserId); Loading
services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java +3 −1 Original line number Diff line number Diff line Loading @@ -177,10 +177,12 @@ public class UserManagerTest extends AndroidTestCase { UserInfo userInfo = createProfileForUser("Profile", UserInfo.FLAG_MANAGED_PROFILE, primaryUserId); assertNotNull(userInfo); assertNull(mUserManager.getProfileParent(primaryUserId)); UserInfo parentProfileInfo = mUserManager.getProfileParent(userInfo.id); assertNotNull(parentProfileInfo); assertEquals(parentProfileInfo.id, primaryUserId); removeUser(userInfo.id); assertNull(mUserManager.getProfileParent(primaryUserId)); } // Make sure only one managed profile can be created Loading