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

Commit 13810374 authored by Tony Mak's avatar Tony Mak
Browse files

Allow shell to enable/disable individual component in test package

Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.ManagedProfileTest#testAppLinks_enabledStatus

Bug: 32695379
Change-Id: I0fa22f50f1aa344195b7c6bc1e6ee97879d91c46
parent 12a0f119
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -18088,8 +18088,10 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
        }
        synchronized (mPackages) {
            if (uid == Process.SHELL_UID) {
            if (uid == Process.SHELL_UID
                    && (pkgSetting.pkgFlags & ApplicationInfo.FLAG_TEST_ONLY) == 0) {
                // Shell can only change whole packages between ENABLED and DISABLED_USER states
                // unless it is a test package.
                int oldState = pkgSetting.getEnabled(userId);
                if (className == null
                    &&