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

Commit 537b09dd authored by Adam Bookatz's avatar Adam Bookatz
Browse files

LogoutUser relies on SYSTEM.supportsSwitchTo

logoutUser always switches to the system user. All that therefore
matters is that the device can, in fact, switch to the system user. This
is irrespective of whether it is HSUM or not, so we don't need any
special-casing; we can just request whether we can switch to user 0.
This is a general policy: we avoid checking modes and instead check
properties - in this case, whether SYSTEM_USER has the property allowing
us to switch to it.

Also fixes some UserControllerTest logoutUser tests that weren't working
properly since they weren't ever actually switching users.

Test: UserControllerTest
Bug: 411696141
Bug: 428046912
Flag: EXEMPT trivial equivalent code
Change-Id: I14bd7e92679c51f799737ca22faecf77fc9039b7
parent e3ef8bea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment