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

Commit b384461f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Avoid marking ephemeral users for removal if they haven't been logged in"" into main

parents e7d55044 6b90dbd4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1194,11 +1194,11 @@ public class UserManagerService extends IUserManager.Stub {
            // Avoid marking pre-created users for removal.
            return;
        }
        if (ui.lastLoggedInTime == 0) {
            // Avoid marking a not-yet-logged-in ephemeral user for removal, since it doesn't have
            // any personal data in it yet due to not being logged in.
            // This will also avoid marking an auto-created not-yet-logged-in ephemeral guest user
            // for removal, which would be recreated again later in the boot anyway.
        if (ui.lastLoggedInTime == 0 && ui.isGuest() && Resources.getSystem().getBoolean(
                com.android.internal.R.bool.config_guestUserAutoCreated)) {
            // Avoid marking auto-created but not-yet-logged-in guest user for removal. Because a
            // new one will be created anyway, and this one doesn't have any personal data in it yet
            // due to not being logged in.
            return;
        }
        // Mark the user for removal.