Fixed DPM.logoutUser() methods.
The initial implementation was setting the logout user to be SYSTEM
on non-headless system user mode, but recently it was changed to
return null if the user was not switched or started by the device
admin.
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser_systemApi com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser # on phones and automotive
Fixes: 216648012
Change-Id: I1f8f754167260a41df13dca13cb62467723c99b1
2 files changed