Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b82bd9b2 authored by Anna Bauza's avatar Anna Bauza Committed by Android (Google) Code Review
Browse files

Merge "Add user 0 when more than one UserInfo atom is reported."

parents 7da331c7 55294a80
Loading
Loading
Loading
Loading
+24 −27
Original line number Original line Diff line number Diff line
@@ -4653,17 +4653,13 @@ public class UserManagerService extends IUserManager.Stub {
        }
        }
        final List<UserInfo> users = getUsersInternal(true, true, true);
        final List<UserInfo> users = getUsersInternal(true, true, true);
        final int size = users.size();
        final int size = users.size();
        if (size > 1) {
            for (int idx = 0; idx < size; idx++) {
            for (int idx = 0; idx < size; idx++) {
                final UserInfo user = users.get(idx);
                final UserInfo user = users.get(idx);
            if (user.id == UserHandle.USER_SYSTEM) {
                // Skip user 0. It's not interesting. We already know it exists, is running, and (if
                // we know the device configuration) its userType.
                continue;
            }

                final int userTypeStandard = UserManager.getUserTypeForStatsd(user.userType);
                final int userTypeStandard = UserManager.getUserTypeForStatsd(user.userType);
            final String userTypeCustom = (userTypeStandard ==
                final String userTypeCustom = (userTypeStandard == FrameworkStatsLog
                    FrameworkStatsLog.USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__TYPE_UNKNOWN) ?
                        .USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__TYPE_UNKNOWN)
                        ?
                        user.userType : null;
                        user.userType : null;


                boolean isUserRunningUnlocked;
                boolean isUserRunningUnlocked;
@@ -4682,6 +4678,7 @@ public class UserManagerService extends IUserManager.Stub {
                        isUserRunningUnlocked
                        isUserRunningUnlocked
                ));
                ));
            }
            }
        }
        return android.app.StatsManager.PULL_SUCCESS;
        return android.app.StatsManager.PULL_SUCCESS;
    }
    }