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

Commit 6b90dbd4 authored by Yasin Kilicdere's avatar Yasin Kilicdere Committed by Android (Google) Code Review
Browse files

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

This reverts commit 29baee32.

Reason for revert: Didn't make any improvements for b/352716720 and caused b/364773103

Bug: 352716720
Change-Id: I5776a3b3a0fe57ac2e753682d804bfb37592fbad
Fixes: 364773103
parent 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) {
            // 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.