Manish Singh
2023-09-28 12:02:21 +01:00
parent a223c7644e
commit 6efc455f2c
32 changed files with 954 additions and 162 deletions

View File

@@ -296,14 +296,15 @@ public class AccountPreferenceController extends AbstractPreferenceController
updateProfileUi(userInfo);
} else {
List<UserInfo> profiles = mUm.getProfiles(UserHandle.myUserId());
final int profilesCount = profiles.size();
for (int i = 0; i < profilesCount; i++) {
if (profiles.get(i).isManagedProfile()
&& (mType & ProfileSelectFragment.ProfileType.WORK) != 0) {
updateProfileUi(profiles.get(i));
} else if (!profiles.get(i).isManagedProfile()
&& (mType & ProfileSelectFragment.ProfileType.PERSONAL) != 0) {
updateProfileUi(profiles.get(i));
for (UserInfo profile : profiles) {
if ((profile.isManagedProfile()
&& (mType & ProfileSelectFragment.ProfileType.WORK) != 0)
|| (profile.isPrivateProfile()
&& (mType & ProfileSelectFragment.ProfileType.PRIVATE) != 0)
|| (!profile.isManagedProfile()
&& !profile.isPrivateProfile()
&& (mType & ProfileSelectFragment.ProfileType.PERSONAL) != 0)) {
updateProfileUi(profile);
}
}
}