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

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

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

parents 89809a19 29baee32
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 && 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.
        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.
            return;
        }
        // Mark the user for removal.