Skip to content
Commit 52660ae7 authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent 278967f2
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