diff options
author | Kholoud Mohamed <kholoudm@google.com> | 2021-08-18 09:08:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-08-18 09:08:08 +0000 |
commit | 5060fce4a159b5c1b0867be33e83eb98372762ab (patch) | |
tree | f842f3fc19fc8ee05de5e5ee2e97938c4166d695 | |
parent | a169d6254b77f9c4dbf101beeea53b9b3567868f (diff) | |
parent | c08a337238a50db34a8fda288c8a99db7f259311 (diff) | |
download | cts-5060fce4a159b5c1b0867be33e83eb98372762ab.tar.gz |
Merge "Add --user flag while running resolve-activity command" into sc-dev
-rw-r--r-- | hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java index f69cbaaf04e..fa044aded41 100644 --- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java +++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java @@ -185,7 +185,7 @@ public abstract class DeviceAndProfileOwnerTest extends BaseDevicePolicyTest { private static final int PERMISSION_GRANT_STATE_GRANTED = 1; private static final int PERMISSION_GRANT_STATE_DENIED = 2; private static final String PARAM_APP_TO_ENABLE = "app_to_enable"; - public static final String RESOLVE_ACTIVITY_CMD = "cmd package resolve-activity --brief %s | tail -n 1"; + public static final String RESOLVE_ACTIVITY_CMD = "cmd package resolve-activity --brief --user %d %s | tail -n 1"; private static final String NOT_CALLED_FROM_PARENT = "notCalledFromParent"; @@ -1723,7 +1723,7 @@ public abstract class DeviceAndProfileOwnerTest extends BaseDevicePolicyTest { final List<String> enabledSystemPackageNames = getEnabledSystemPackageNames(); for (String enabledSystemPackage : enabledSystemPackageNames) { final String result = getDevice().executeShellCommand( - String.format(RESOLVE_ACTIVITY_CMD, enabledSystemPackage)); + String.format(RESOLVE_ACTIVITY_CMD, mUserId, enabledSystemPackage)); if (!result.contains("No activity found")) { return enabledSystemPackage; } |