Check new user restriction for profile removal

Test: make RunSettingsRoboTests
Bug: 31952368
Change-Id: I3c8b0820a5541201006d12f9893d5b89332334c2
This commit is contained in:
Esteban Talavera
2016-11-30 22:14:00 +00:00
parent 9a35bc6552
commit 50e515e5ec
2 changed files with 5 additions and 3 deletions

View File

@@ -242,7 +242,8 @@ public class AccountPreferenceControllerTest {
infos.add(new UserInfo(1, "user 1", UserInfo.FLAG_MANAGED_PROFILE));
when(mUserManager.isManagedProfile()).thenReturn(false);
when(mUserManager.getProfiles(anyInt())).thenReturn(infos);
when(mAccountHelper.hasBaseUserRestriction(eq(UserManager.DISALLOW_REMOVE_USER), anyInt()))
when(mAccountHelper.hasBaseUserRestriction(
eq(UserManager.DISALLOW_REMOVE_MANAGED_PROFILE), anyInt()))
.thenReturn(true);
mController.updateRawDataToIndex(data);