summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKholoud Mohamed <kholoudm@google.com>2021-08-18 09:08:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-08-18 09:08:08 +0000
commit5060fce4a159b5c1b0867be33e83eb98372762ab (patch)
treef842f3fc19fc8ee05de5e5ee2e97938c4166d695
parenta169d6254b77f9c4dbf101beeea53b9b3567868f (diff)
parentc08a337238a50db34a8fda288c8a99db7f259311 (diff)
downloadcts-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.java4
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;
}