Loading tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +13 −13 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { * @param files the paths of files which might contain wildcards */ private void deleteFiles(String... files) throws Exception { try { getDevice().enableAdbRoot(); boolean found = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); Loading @@ -116,17 +118,15 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { } if (found) { try { getDevice().enableAdbRoot(); getDevice().remountSystemWritable(); for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); } getDevice().reboot(); } } finally { getDevice().disableAdbRoot(); } getDevice().reboot(); } } private void waitForDeviceNotAvailable(long timeout, TimeUnit unit) { Loading tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { * @param files the paths of files which might contain wildcards */ private void deleteFiles(String... files) throws Exception { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } boolean found = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); Loading @@ -122,9 +126,6 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { } if (found) { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } getDevice().remountSystemWritable(); for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); Loading Loading
tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java +13 −13 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { * @param files the paths of files which might contain wildcards */ private void deleteFiles(String... files) throws Exception { try { getDevice().enableAdbRoot(); boolean found = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); Loading @@ -116,17 +118,15 @@ public class StagedRollbackTest extends BaseHostJUnit4Test { } if (found) { try { getDevice().enableAdbRoot(); getDevice().remountSystemWritable(); for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); } getDevice().reboot(); } } finally { getDevice().disableAdbRoot(); } getDevice().reboot(); } } private void waitForDeviceNotAvailable(long timeout, TimeUnit unit) { Loading
tests/StagedInstallTest/src/com/android/tests/stagedinstallinternal/host/StagedInstallInternalTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { * @param files the paths of files which might contain wildcards */ private void deleteFiles(String... files) throws Exception { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } boolean found = false; for (String file : files) { CommandResult result = getDevice().executeShellV2Command("ls " + file); Loading @@ -122,9 +126,6 @@ public class StagedInstallInternalTest extends BaseHostJUnit4Test { } if (found) { if (!getDevice().isAdbRoot()) { getDevice().enableAdbRoot(); } getDevice().remountSystemWritable(); for (String file : files) { getDevice().executeShellCommand("rm -rf " + file); Loading