Skip to content
Commit cc58e765 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Put the current user to mUsers in UserManagerServiceTest.

Because of the way we construct UMS from UserManagerServiceTest, it
can not populate mUsers with existing users. Because it can not find
userlist.xml and fallback to single user.

And the test methods which try to set a restriction for the current
user fail because UMS.setUserRestriction fails with "Cannot set user
restriction no_user_switch. User with id 10 does not exist." error.

We're fixing this issue by manually adding the current user to
UMS.mUsers via mUserManagerService.putUserInfo() method.

Note: These lines were removed in master via ag/23877017, but for UserManagerServiceTest#assertHasUserRestriction test we still need it.

Bug: 289995536
Change-Id: I57f6f910f0ad9b91b05fd895fba8db69017a25cc
Test: atest UserManagerServiceTest
parent 04aee426
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