summaryrefslogtreecommitdiff
path: root/tests/RollbackTest
diff options
context:
space:
mode:
authorJW Wang <wangchun@google.com>2020-02-20 13:51:17 +0800
committerJW Wang <wangchun@google.com>2020-02-20 18:52:21 +0800
commit14168f321a8c29a16ea70a1d4b4605a0166f90be (patch)
tree73a4b7d87347aef473a61e0886ea3e2a825e3102 /tests/RollbackTest
parent67eb86bb4c40a99b19222a81046a835e080ef11c (diff)
Remove unused code (4/n)
Bug: 149876119 Test: m Change-Id: I3f7c88eeb74ce5b44646fcb7a690665b78a17f2d
Diffstat (limited to 'tests/RollbackTest')
-rw-r--r--tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java b/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
index ecd3db5c6849..e616ac46830f 100644
--- a/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
+++ b/tests/RollbackTest/MultiUserRollbackTest/src/com/android/tests/rollback/host/MultiUserRollbackTest.java
@@ -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");
- }
}