summaryrefslogtreecommitdiff
path: root/tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java')
-rw-r--r--tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java b/tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java
index 8db2002cc..1462886ca 100644
--- a/tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java
+++ b/tests/robotests/src/com/android/car/settings/profiles/ProfileHelperTest.java
@@ -56,8 +56,7 @@ import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowProcess;
@RunWith(RobolectricTestRunner.class)
-@Config(shadows = {ShadowActivityManager.class, ShadowUserManager.class,
- ShadowUserIconProvider.class})
+@Config(shadows = {ShadowUserManager.class, ShadowUserIconProvider.class})
public class ProfileHelperTest {
private static final String DEFAULT_ADMIN_NAME = "default_admin";
@@ -416,7 +415,7 @@ public class ProfileHelperTest {
@Test
public void testGetMaxSupportedRealUsers_isHeadless() {
ShadowUserManager.setIsHeadlessSystemUserMode(true);
- ShadowUserManager.setMaxSupportedUsers(7);
+ when(mMockUserManager.getMaxSupportedUsers()).thenReturn(7);
// Create System user, two managed profiles, and two normal users.
UserInfo user0 = createAdminUser(0);
@@ -434,7 +433,7 @@ public class ProfileHelperTest {
@Test
public void testGetMaxSupportedRealUsers_isNotHeadless() {
ShadowUserManager.setIsHeadlessSystemUserMode(false);
- ShadowUserManager.setMaxSupportedUsers(7);
+ when(mMockUserManager.getMaxSupportedUsers()).thenReturn(7);
// Create System user, two managed profiles, and two normal users.
UserInfo user0 = createAdminUser(0);