Pass "-g --user all" when installing apps (3/n)
'-g' to grant permissions automatically without checking the API level. This works around the issue of b/149733368#comment2. '--user all' to install the app on all users. This is more efficient than calling #installPackageAsUser one by one on each user. Bug: 149876119 Test: atest MultiUserRollbackTest Change-Id: Ia5d85d3c13925ae969ffab9319360c1fefe1f950
This commit is contained in:
@@ -51,8 +51,8 @@ public class MultiUserRollbackTest extends BaseHostJUnit4Test {
|
||||
public void setup() throws Exception {
|
||||
mOriginalUserId = getDevice().getCurrentUser();
|
||||
createAndStartSecondaryUser();
|
||||
installPackageAsUser("RollbackTest.apk", true, mOriginalUserId);
|
||||
installPackageAsUser("RollbackTest.apk", true, mSecondaryUserId);
|
||||
// TODO(b/149733368): Remove the '-g' workaround when the bug is fixed.
|
||||
installPackage("RollbackTest.apk", "-g --user all");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user