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
Loading
Please register or sign in to comment