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

Commit 8cce6d42 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixes UMS.getPreCreatedUserLU() to ignore partial pre-created users.

Test: atest android.car.cts.PreCreateUsersHostTest#testAppPermissionsPreCreatedUserPackages # on automotive
Fixes: 229814265

Change-Id: I7c6b90e2c4af5ff0482c5445c1986d389e6a6610
Merged-In: I7c6b90e2c4af5ff0482c5445c1986d389e6a6610
(cherry picked from commit f173defe)
parent 14fff66f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3966,7 +3966,7 @@ public class UserManagerService extends IUserManager.Stub {
        for (int i = 0; i < userSize; i++) {
        for (int i = 0; i < userSize; i++) {
            final UserData user = mUsers.valueAt(i);
            final UserData user = mUsers.valueAt(i);
            if (DBG) Slog.d(LOG_TAG, i + ":" + user.info.toFullString());
            if (DBG) Slog.d(LOG_TAG, i + ":" + user.info.toFullString());
            if (user.info.preCreated && user.info.userType.equals(userType)) {
            if (user.info.preCreated && !user.info.partial && user.info.userType.equals(userType)) {
                if (!user.info.isInitialized()) {
                if (!user.info.isInitialized()) {
                    Slog.w(LOG_TAG, "found pre-created user of type " + userType
                    Slog.w(LOG_TAG, "found pre-created user of type " + userType
                            + ", but it's not initialized yet: " + user.info.toFullString());
                            + ", but it's not initialized yet: " + user.info.toFullString());