Remove unused code (4/n)

Bug: 149876119
Test: m
Change-Id: I3f7c88eeb74ce5b44646fcb7a690665b78a17f2d
This commit is contained in:
JW Wang
2020-02-20 13:51:17 +08:00
parent 67eb86bb4c
commit 14168f321a

View File

@@ -108,30 +108,4 @@ public class MultiUserRollbackTest extends BaseHostJUnit4Test {
// Note we can't install apps on a locked user
awaitUserUnlocked(mSecondaryUserId);
}
private void createAndSwitchToSecondaryUserIfNecessary() throws Exception {
if (mSecondaryUserId == -1) {
mOriginalUserId = getDevice().getCurrentUser();
mSecondaryUserId = getDevice().createUser("MultiUserRollbackTest_User"
+ System.currentTimeMillis());
switchToUser(mSecondaryUserId);
}
}
private void switchToUser(int userId) throws Exception {
if (getDevice().getCurrentUser() == userId) {
return;
}
assertTrue(getDevice().switchUser(userId));
for (int i = 0; i < SWITCH_USER_COMPLETED_NUMBER_OF_POLLS; ++i) {
String userState = getDevice().executeShellCommand("am get-started-user-state "
+ userId);
if (userState.contains("RUNNING_UNLOCKED")) {
return;
}
Thread.sleep(SWITCH_USER_COMPLETED_POLL_INTERVAL_IN_MILLIS);
}
fail("User switch to user " + userId + " timed out");
}
}