Replaces DPM.clearLogoutUser() by logoutUser()
Prior to this change, internal components like Settings or
CarUserManager would need to call 3 APIs to logout a managed user:
1. previousUserId = getLogoutUser();
2. switchUser(previousUserId);
3. clearLogoutUser();
This CL encapsulates the whole process into a new DPM.logoutUser(),
but it keeps the getLogoutUser() (as Car need to know which user it
will be switched to in advance, due to the Vehicle HAL integration).
Test: m update-api
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser_system
Fixes: 214336184
Change-Id: Ifffc229ecede5d086338e9c7fa08dce0e0de884c
4 files changed