Home
last modified time | relevance | path

Searched refs:UserInfo (Results 1 – 24 of 24) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/
DRunOnSecondaryUserTargetPreparerTest.java19 import static com.android.tradefed.device.UserInfo.FLAG_FOR_TESTING;
33 import com.android.tradefed.device.UserInfo;
77 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp()
78 userInfos.put(0, new UserInfo(0, "system", /* flag= */ 0, /* isRunning= */ true)); in setUp()
122 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_secondaryUserAlreadyExists_doesNotCreateSecondaryUser()
125 new UserInfo(2, "secondary", /* flag= */ FLAG_FOR_TESTING, /* isRunning= */ true)); in setUp_secondaryUserAlreadyExists_doesNotCreateSecondaryUser()
137 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_secondaryUserAlreadyExists_startsAndSwitchesToSecondaryUser()
140 new UserInfo(2, "secondary", /* flag= */ FLAG_FOR_TESTING, /* isRunning= */ true)); in setUp_secondaryUserAlreadyExists_startsAndSwitchesToSecondaryUser()
166 Map<Integer, UserInfo> userInfos = new HashMap<>(); in tearDown_secondaryUserAlreadyExists_switchesBackToInitialUser()
169 new UserInfo(2, "secondary", /* flag= */ FLAG_FOR_TESTING, /* isRunning= */ true)); in tearDown_secondaryUserAlreadyExists_switchesBackToInitialUser()
[all …]
DRunOnWorkProfileTargetPreparerTest.java19 import static com.android.tradefed.device.UserInfo.UserType.MANAGED_PROFILE;
34 import com.android.tradefed.device.UserInfo;
173 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_workProfileAlreadyExists_doesNotCreateWorkProfile()
176 new UserInfo( in setUp_workProfileAlreadyExists_doesNotCreateWorkProfile()
179 /* flag= */ UserInfo.FLAG_MANAGED_PROFILE, in setUp_workProfileAlreadyExists_doesNotCreateWorkProfile()
191 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_workProfileAlreadyExists_hasDeviceOwner_doesNotRemoveDeviceOwner()
194 new UserInfo( in setUp_workProfileAlreadyExists_hasDeviceOwner_doesNotRemoveDeviceOwner()
197 /* flag= */ UserInfo.FLAG_MANAGED_PROFILE, in setUp_workProfileAlreadyExists_hasDeviceOwner_doesNotRemoveDeviceOwner()
224 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_workProfileAlreadyExists_runsTestAsExistingUser()
227 new UserInfo( in setUp_workProfileAlreadyExists_runsTestAsExistingUser()
[all …]
DSwitchUserTargetPreparerTest.java31 import com.android.tradefed.device.UserInfo;
75 /* flags= */ new Integer[] {0, UserInfo.FLAG_PRIMARY}); in testSetUpRunAsPrimary_ifAlreadyInPrimary_noSwitch()
93 /* flags= */ new Integer[] {0, UserInfo.FLAG_PRIMARY}); in testSetUpRunAsSystem_ifAlreadyInSystem_noSwitch()
112 UserInfo.FLAG_PRIMARY, UserInfo.FLAG_MAIN, UserInfo.FLAG_GUEST in testSetUpRunAsSystem_ifSystemSwitchIsNotAllowed_switchToMain()
137 UserInfo.FLAG_PRIMARY, UserInfo.FLAG_MAIN, UserInfo.FLAG_GUEST in testSetUpRunAsSystem_ifSystemSwitchIsNotAllowed_noSwitchIfAlreadyOnMainUser()
159 /* flags= */ new Integer[] {0, UserInfo.FLAG_PRIMARY, 0}); in testSetUpRunAsPrimary_ifNotInPrimary_switchToPrimary()
178 /* flags= */ new Integer[] {0, UserInfo.FLAG_GUEST, 0}); in testSetUpRunAsGuest_ifNotInGuest_switchToGuest()
255 /* flags= */ new Integer[] {UserInfo.FLAG_PRIMARY, 0}); in testSetUp_ifSwitchFails_throwsTargetSetupError()
269 Map<Integer, UserInfo> result = new HashMap<>(); in mockListUsersInfo()
274 new UserInfo( in mockListUsersInfo()
DRunOnCloneProfileTargetPreparerTest.java19 import static com.android.tradefed.device.UserInfo.UserType.CLONE_PROFILE;
35 import com.android.tradefed.device.UserInfo;
162 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_profileAlreadyExists_doesNotCreateProfile()
165 new UserInfo( in setUp_profileAlreadyExists_doesNotCreateProfile()
168 /* flag= */ UserInfo.FLAG_PROFILE, in setUp_profileAlreadyExists_doesNotCreateProfile()
194 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_profileAlreadyExists_runsTestAsExistingUser()
197 new UserInfo( in setUp_profileAlreadyExists_runsTestAsExistingUser()
200 /* flag= */ UserInfo.FLAG_PROFILE, in setUp_profileAlreadyExists_runsTestAsExistingUser()
236 Map<Integer, UserInfo> userInfos = new HashMap<>(); in tearDown_profileAlreadyExists_doesNotRemoveProfile()
239 new UserInfo( in tearDown_profileAlreadyExists_doesNotRemoveProfile()
[all …]
DRunOnPrivateProfileTargetPreparerTest.java19 import static com.android.tradefed.device.UserInfo.UserType.PRIVATE_PROFILE;
35 import com.android.tradefed.device.UserInfo;
138 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_profileAlreadyExists_doesNotCreateProfile()
141 new UserInfo( in setUp_profileAlreadyExists_doesNotCreateProfile()
144 /* flag= */ UserInfo.FLAG_PROFILE, in setUp_profileAlreadyExists_doesNotCreateProfile()
176 Map<Integer, UserInfo> userInfos = new HashMap<>(); in setUp_profileAlreadyExists_runsTestAsExistingUser()
179 new UserInfo( in setUp_profileAlreadyExists_runsTestAsExistingUser()
182 /* flag= */ UserInfo.FLAG_PROFILE, in setUp_profileAlreadyExists_runsTestAsExistingUser()
222 Map<Integer, UserInfo> userInfos = new HashMap<>(); in tearDown_profileAlreadyExists_doesNotRemoveProfile()
225 new UserInfo( in tearDown_profileAlreadyExists_doesNotRemoveProfile()
[all …]
DCreateUserPreparerTest.java28 import com.android.tradefed.device.UserInfo;
87 Map<Integer, UserInfo> existingUsers = Map.of( in testSetUp_tearDown_reuseTestUser()
88 0, new UserInfo( in testSetUp_tearDown_reuseTestUser()
93 13, new UserInfo( in testSetUp_tearDown_reuseTestUser()
120 Map<Integer, UserInfo> existingUsers = Map.of( in testSetUp_tearDown_reuseTestUser_noExistingTestUser()
121 0, new UserInfo( in testSetUp_tearDown_reuseTestUser_noExistingTestUser()
157 Map<Integer, UserInfo> existingUsers = Map.of( in testSetUp_maxUsersReached()
158 0, new UserInfo( in testSetUp_maxUsersReached()
163 11, new UserInfo( in testSetUp_maxUsersReached()
168 13, new UserInfo( in testSetUp_maxUsersReached()
[all …]
DVisibleBackgroundUserPreparerTest.java29 import com.android.tradefed.device.UserInfo;
200 Map<Integer, UserInfo> existingUsers = in testSetUp_tearDown_reuseTestUser_invisible()
203 new UserInfo( in testSetUp_tearDown_reuseTestUser_invisible()
209 new UserInfo( in testSetUp_tearDown_reuseTestUser_invisible()
235 Map<Integer, UserInfo> existingUsers = in testSetUp_tearDown_reuseTestUser_alreadyVisible()
238 new UserInfo( in testSetUp_tearDown_reuseTestUser_alreadyVisible()
244 new UserInfo( in testSetUp_tearDown_reuseTestUser_alreadyVisible()
271 Map<Integer, UserInfo> existingUsers = in testSetUp_tearDown_reuseTestUser_noExistingTestUser()
274 new UserInfo( in testSetUp_tearDown_reuseTestUser_noExistingTestUser()
299 Map<Integer, UserInfo> existingUsers = in testSetUp_maxUsersReached()
[all …]
DTestAppInstallSetupTest.java41 import com.android.tradefed.device.UserInfo;
240 Map<Integer, UserInfo> userInfos = new HashMap<>(); in testSetupAndTeardown_install_runTestsAsUser()
/tools/tradefederation/core/src/com/android/tradefed/suite/checker/
DUserChecker.java26 import com.android.tradefed.device.UserInfo;
42 private UserInfo.UserType mUserToSwitchTo = UserInfo.UserType.CURRENT;
56 private UserInfo mPreCurrentUserInfo = null;
57 private Map<Integer, UserInfo> mPreUsersInfo = null;
101 Map<Integer, UserInfo> postUsersInfo = device.getUserInfos(); in postExecutionCheck()
102 UserInfo postCurrentUserInfo = postUsersInfo.get(device.getCurrentUser()); in postExecutionCheck()
124 for (UserInfo preUserInfo : mPreUsersInfo.values()) { in postExecutionCheck()
131 UserInfo postUserInfo = postUsersInfo.get(preUserId); in postExecutionCheck()
162 private int findMatchingUser(Collection<UserInfo> usersInfo) { in findMatchingUser()
163 for (UserInfo userInfo : usersInfo) { in findMatchingUser()
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DSwitchUserTargetPreparer.java23 import com.android.tradefed.device.UserInfo;
42 private UserInfo.UserType mUserToSwitchTo = UserInfo.UserType.CURRENT;
53 Map<Integer, UserInfo> userInfos = device.getUserInfos(); in setUp()
64 for (UserInfo userInfo : userInfos.values()) { in setUp()
103 if (UserInfo.UserType.SYSTEM.equals(mUserToSwitchTo) in setUserToSwitchTo()
106 mUserToSwitchTo = UserInfo.UserType.MAIN; in setUserToSwitchTo()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DRunOnSecondaryUserTargetPreparer.java25 import com.android.tradefed.device.UserInfo;
135 for (Map.Entry<Integer, UserInfo> userInfo : device.getUserInfos().entrySet()) { in getTargetSecondaryUserId()
207 Map<Integer, UserInfo> userInfoMap = device.getUserInfos(); in removeNonForTestingUsers()
209 List<UserInfo> userInfos = new ArrayList<>(userInfoMap.values()); in removeNonForTestingUsers()
210 Collections.sort(userInfos, Comparator.comparing(UserInfo::userId)); in removeNonForTestingUsers()
216 for (UserInfo userInfo : userInfos) { in removeNonForTestingUsers()
230 private static boolean isForTesting(UserInfo userInfo) { in isForTesting()
DUserHelper.java22 import com.android.tradefed.device.UserInfo;
87 for (Map.Entry<Integer, UserInfo> entry : device.getUserInfos().entrySet()) { in cleanupOldUsersIfLimitReached()
88 UserInfo userInfo = entry.getValue(); in cleanupOldUsersIfLimitReached()
110 for (Map.Entry<Integer, UserInfo> entry : device.getUserInfos().entrySet()) { in findExistingTradefedUser()
DRunOnPrivateProfileTargetPreparer.java19 import static com.android.tradefed.device.UserInfo.UserType.PRIVATE_PROFILE;
DRunOnWorkProfileTargetPreparer.java19 import static com.android.tradefed.device.UserInfo.UserType.MANAGED_PROFILE;
DRunOnCloneProfileTargetPreparer.java19 import static com.android.tradefed.device.UserInfo.UserType.CLONE_PROFILE;
DProfileTargetPreparer.java24 import com.android.tradefed.device.UserInfo;
25 import com.android.tradefed.device.UserInfo.UserType;
186 for (Map.Entry<Integer, UserInfo> userInfo : device.getUserInfos().entrySet()) { in getExistingProfileId()
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/
DUserInfo.java25 public final class UserInfo { class
122 public UserInfo(int userId, String userName, int flag, boolean isRunning) { in UserInfo() method in UserInfo
129 public UserInfo(int userId, String userName, int flag, boolean isRunning, String userType) { in UserInfo() method in UserInfo
DITestDevice.java787 public Map<Integer, UserInfo> getUserInfos() throws DeviceNotAvailableException; in getUserInfos()
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DTestDeviceUserFuncTest.java72 Map<Integer, UserInfo> userInfos = mTestDevice.getUserInfos(); in testUserLifecycle()
75 UserInfo info = userInfos.get(userId); in testUserLifecycle()
DTestDeviceTest.java2942 Map<Integer, UserInfo> actual = testDevice.getUserInfos(); in testListUsersInfo_oneUser_preT()
2945 UserInfo user0 = actual.get(0); in testListUsersInfo_oneUser_preT()
2967 Map<Integer, UserInfo> actual = testDevice.getUserInfos(); in testListUsersInfo_oneUser_postT()
2970 UserInfo user0 = actual.get(0); in testListUsersInfo_oneUser_postT()
2987 Map<Integer, UserInfo> actual = testDevice.getUserInfos(); in testListUsersInfo_multiUsers()
2990 UserInfo user0 = actual.get(0); in testListUsersInfo_multiUsers()
2996 UserInfo user10 = actual.get(10); in testListUsersInfo_multiUsers()
3949 UserInfo.FLAG_PRIMARY, in testIsUserSecondary()
3950 UserInfo.FLAG_GUEST, in testIsUserSecondary()
3951 UserInfo.FLAG_MANAGED_PROFILE, in testIsUserSecondary()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/suite/checker/
DUserCheckerTest.java31 import com.android.tradefed.device.UserInfo;
264 /* flags= */ new Integer[] {0, UserInfo.FLAG_GUEST}, in testSwitchToGuest()
339 Map<Integer, UserInfo> result = new HashMap<>(); in mockListUsersInfo()
344 new UserInfo( in mockListUsersInfo()
/tools/tradefederation/core/javatests/com/android/tradefed/util/
DITestDeviceMockHelper.java26 import com.android.tradefed.device.UserInfo;
45 public void mockGetUserInfos(Map<Integer, UserInfo> existingUsers) throws Exception { in mockGetUserInfos()
/tools/tradefederation/core/src/com/android/tradefed/device/
DTestDevice.java1526 public Map<Integer, UserInfo> getUserInfos() throws DeviceNotAvailableException { in getUserInfos()
1528 Map<Integer, UserInfo> result = new HashMap<Integer, UserInfo>(lines.size()); in getUserInfos()
1531 UserInfo userInfo = in getUserInfos()
1532 new UserInfo( in getUserInfos()
1541 UserInfo userInfo = in getUserInfos()
1542 new UserInfo( in getUserInfos()
2091 if (userId == UserInfo.USER_SYSTEM) { in isUserSecondary()
2098 return (flags & UserInfo.FLAGS_NOT_SECONDARY) == 0; in isUserSecondary()
DNativeDevice.java4885 public Map<Integer, UserInfo> getUserInfos() throws DeviceNotAvailableException { in getUserInfos()