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

Skip to content
Commit 413bfbf3 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Skip disabled users in UserManager.getPreviousForegroundUser() method.

When a guest user is reset in Settings, UM.markGuestForDeletion() is
called for the previous guest user and it gets marked with
FLAG_DISABLED. After the reset, if
UserManager.getPreviousForegroundUser() is called, it returns that
previous guest user which is marked as disabled, but it shouldn't.
This CL adds an additional userData.info.isEnabled() check to skip the
disabled users.

Bug: 283106632
Test: atest FrameworksMockingServicesTests:com.android.server.pm.UserManagerServiceTest
Test: atest UserManagerServiceCreateProfileTest
Test: atest UserManagerServiceIdRecyclingTest
Change-Id: I544b96a7fd42a9542862eb804a5557f19f5a4104
parent 8b58515d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment