Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67eb86bb authored by JW Wang's avatar JW Wang
Browse files

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
parent f2a75879
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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