/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | UserUtilTest.java | 45 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/ |
D | SwitchUserTargetPreparerTest.java | 66 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()
|
D | CreateUserPreparerTest.java | 50 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()
|
D | UserCleanerTest.java | 57 verify(mMockDevice, times(1)).switchUser(0); in testRemoveUsers()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | UserUtil.java | 72 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/ |
D | CreateUserPreparer.java | 46 if (!device.switchUser(mCreatedUserId)) { in setUp() 66 if (!device.switchUser(mOriginalUser)) { in tearDown()
|
D | UserCleaner.java | 42 device.switchUser(ownerId); in tearDown()
|
D | SwitchUserTargetPreparer.java | 65 if (device.switchUser(mPreExecutionCurrentUser)) { in tearDown()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/suite/checker/ |
D | UserCheckerTest.java | 100 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/ |
D | ITestDevice.java | 773 public boolean switchUser(int userId) throws DeviceNotAvailableException; in switchUser() method 783 public boolean switchUser(int userId, long timeout) throws DeviceNotAvailableException; in switchUser() method
|
D | TestDevice.java | 1355 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
|
D | NativeDevice.java | 3961 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/ |
D | TestDeviceTest.java | 3102 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()
|
D | NativeDeviceTest.java | 585 mTestDevice.switchUser(10); in testSwitchUser_exception() 596 mTestDevice.switchUser(10, 5*1000); in testSwitchUserTimeout_exception()
|