Home
last modified time | relevance | path

Searched refs:switchUser (Results 1 – 14 of 14) sorted by relevance

/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DUserUtilTest.java45 when(device.switchUser(UserUtil.USER_SYSTEM)).thenReturn(true); in testSwitchToUserSystemSuccess()
48 verify(device, times(1)).switchUser(UserUtil.USER_SYSTEM); in testSwitchToUserSystemSuccess()
56 when(device.switchUser(UserUtil.USER_SYSTEM)).thenReturn(false); in testSwitchToUserSystemFail()
63 verify(device, times(1)).switchUser(UserUtil.USER_SYSTEM); in testSwitchToUserSystemFail()
75 verify(device, never()).switchUser(currentUser); in testSwitchToSecondaryUserCurrent()
84 when(device.switchUser(10)).thenReturn(true); in testSwitchToSecondaryUserExists()
87 verify(device, times(1)).switchUser(10); in testSwitchToSecondaryUserExists()
99 when(device.switchUser(12)).thenReturn(true); in testSwitchToSecondaryUserWithInvalid()
102 verify(device, times(1)).switchUser(12); in testSwitchToSecondaryUserWithInvalid()
110 when(device.switchUser(10)).thenReturn(true); in testSwitchToPrimaryUserNonSystem()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DSwitchUserTargetPreparerTest.java66 verify(mMockDevice, times(1)).switchUser(11); in testSetUpRunAsPrimary_ifAlreadyInPrimary_switchToPrimary()
80 verify(mMockDevice, times(1)).switchUser(0); in testSetUpRunAsSystem_ifAlreadyInSystem_switchToSystem()
94 verify(mMockDevice, times(1)).switchUser(10); in testSetUpRunAsPrimary_ifNotInPrimary_switchToPrimary()
108 verify(mMockDevice, times(1)).switchUser(USER_SYSTEM); in testSetUpRunAsSystem_ifNotInSystem_switchToSystem()
120 verify(mMockDevice, times(1)).switchUser(0); in testTearDown_ifStartedInSecondary_switchesBackToSecondary()
124 verify(mMockDevice, times(1)).switchUser(10); in testTearDown_ifStartedInSecondary_switchesBackToSecondary()
137 verify(mMockDevice, never()).switchUser(anyInt()); in testSetUp_ifNoSwitchToSpecified_noUserSwitch()
146 when(mMockDevice.switchUser(0)).thenReturn(false); in testSetUp_ifSwitchFails_throwsTargetSetupError()
161 when(mMockDevice.switchUser(anyInt())).thenReturn(true); in mockUsers()
DCreateUserPreparerTest.java50 doReturn(true).when(mMockDevice).switchUser(5); in testSetUp_tearDown()
54 doReturn(true).when(mMockDevice).switchUser(10); in testSetUp_tearDown()
70 verify(mMockDevice, never()).switchUser(Mockito.anyInt()); in testSetUp_tearDown_noCurrent()
DUserCleanerTest.java57 verify(mMockDevice, times(1)).switchUser(0); in testRemoveUsers()
/tools/tradefederation/core/src/com/android/tradefed/util/
DUserUtil.java72 switchUser(device, USER_SYSTEM); in switchToUserType()
75 switchUser(device, device.getPrimaryUserId()); in switchToUserType()
103 switchUser(device, secondary); in switchToSecondaryUser()
106 private static void switchUser(ITestDevice device, int userId) in switchUser() method in UserUtil
108 if (!device.switchUser(userId)) { in switchUser()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DCreateUserPreparer.java46 if (!device.switchUser(mCreatedUserId)) { in setUp()
66 if (!device.switchUser(mOriginalUser)) { in tearDown()
DUserCleaner.java42 device.switchUser(ownerId); in tearDown()
DSwitchUserTargetPreparer.java65 if (device.switchUser(mPreExecutionCurrentUser)) { in tearDown()
/tools/tradefederation/core/tests/src/com/android/tradefed/suite/checker/
DUserCheckerTest.java100 when(device.switchUser(10)).thenReturn(true); in testSwitchToExistingOrCreateUserType()
104 verify(device, times(1)).switchUser(10); in testSwitchToExistingOrCreateUserType()
/tools/tradefederation/core/src/com/android/tradefed/device/
DITestDevice.java773 public boolean switchUser(int userId) throws DeviceNotAvailableException; in switchUser() method
783 public boolean switchUser(int userId, long timeout) throws DeviceNotAvailableException; in switchUser() method
DTestDevice.java1355 public boolean switchUser(int userId) throws DeviceNotAvailableException { in switchUser() method in TestDevice
1356 return switchUser(userId, AM_COMMAND_TIMEOUT); in switchUser()
1363 public boolean switchUser(int userId, long timeout) throws DeviceNotAvailableException { in switchUser() method in TestDevice
DNativeDevice.java3961 public boolean switchUser(int userId) throws DeviceNotAvailableException { in switchUser() method in NativeDevice
3969 public boolean switchUser(int userId, long timeout) throws DeviceNotAvailableException { in switchUser() method in NativeDevice
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceTest.java3102 assertTrue(mTestDevice.switchUser(0)); in testSwitchUser_alreadySameUser()
3133 assertTrue(mTestDevice.switchUser(10)); in testSwitchUser()
3187 assertTrue(mTestDevice.switchUser(10)); in testSwitchUser_delay()
3222 assertFalse(mTestDevice.switchUser(10, 100)); in testSwitchUser_noChange()
DNativeDeviceTest.java585 mTestDevice.switchUser(10); in testSwitchUser_exception()
596 mTestDevice.switchUser(10, 5*1000); in testSwitchUserTimeout_exception()