Merge "Fix an assumption that UserHandle.myUserId() always returns the main user." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
3cf730f6b6
@@ -424,7 +424,8 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
final List<UserHandle> userProfiles = userManager.getUserProfiles();
|
||||
String umUserType = getUmUserType(userType);
|
||||
for (UserHandle profile : userProfiles) {
|
||||
if (profile.getIdentifier() == UserHandle.myUserId()) {
|
||||
if (!com.android.settings.flags.Flags.utilsReturnUserHandleForCurrentUserId()
|
||||
&& profile.getIdentifier() == UserHandle.myUserId()) {
|
||||
continue;
|
||||
}
|
||||
final UserInfo userInfo = userManager.getUserInfo(profile.getIdentifier());
|
||||
|
||||
Reference in New Issue
Block a user