Merge "Use shell command to uninstall network stack package (2/n)"
This commit is contained in:
committed by
Android (Google) Code Review
commit
6c10771e88
@@ -218,7 +218,7 @@ public class StagedRollbackTest {
|
||||
String networkStack = getNetworkStackPackageName();
|
||||
|
||||
rm.expireRollbackForPackage(networkStack);
|
||||
Uninstall.packages(networkStack);
|
||||
uninstallNetworkStackPackage();
|
||||
|
||||
assertThat(getUniqueRollbackInfoForPackage(rm.getAvailableRollbacks(),
|
||||
networkStack)).isNull();
|
||||
@@ -252,6 +252,12 @@ public class StagedRollbackTest {
|
||||
return comp.getPackageName();
|
||||
}
|
||||
|
||||
private void uninstallNetworkStackPackage() {
|
||||
// Since the host side use shell command to install the network stack package, uninstall
|
||||
// must be done by shell command as well. Otherwise uninstall by a different user will fail.
|
||||
runShellCommand("pm uninstall " + getNetworkStackPackageName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPreviouslyAbandonedRollbacks_Phase1() throws Exception {
|
||||
Uninstall.packages(TestApp.A);
|
||||
@@ -294,7 +300,7 @@ public class StagedRollbackTest {
|
||||
String networkStack = getNetworkStackPackageName();
|
||||
|
||||
rm.expireRollbackForPackage(networkStack);
|
||||
Uninstall.packages(networkStack);
|
||||
uninstallNetworkStackPackage();
|
||||
|
||||
assertThat(getUniqueRollbackInfoForPackage(rm.getAvailableRollbacks(),
|
||||
networkStack)).isNull();
|
||||
|
||||
Reference in New Issue
Block a user