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

Commit 52a1d358 authored by Felipe Leme's avatar Felipe Leme
Browse files

Log message when current user is marked as ephemeral.

Test: manual verification
Bug: 155913815

Change-Id: I9fce460cf3515803de4afda70a86eea728e7714e
parent 43389874
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -4029,15 +4029,13 @@ public class UserManagerService extends IUserManager.Stub {
                    if (removeUser(userId)) {
                        return UserManager.REMOVE_RESULT_REMOVED;
                    }

                    Slog.w(LOG_TAG, "Unable to immediately remove non-current user: " + userId
                            + ". User is still set as ephemeral and will be removed on user "
                            + "switch or reboot.");
                }

                // If the user was not immediately removed, make sure it is marked as ephemeral.
                // Don't mark as disabled since, per UserInfo.FLAG_DISABLED documentation, an
                // ephemeral user should only be marked as disabled when its removal is in progress.
                Slog.i(LOG_TAG, "Unable to immediately remove user " + userId + " (current user is "
                        + currentUser + "). User is set as ephemeral and will be removed on user "
                        + "switch or reboot.");
                userData.info.flags |= UserInfo.FLAG_EPHEMERAL;
                writeUserLP(userData);