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
This commit is contained in:
@@ -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
|
||||
&&
|
||||
|
||||
Reference in New Issue
Block a user