diff options
Diffstat (limited to 'hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java')
-rw-r--r-- | hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java b/hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java index c14a89f077f..351826c9382 100644 --- a/hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java +++ b/hostsidetests/statsd/src/android/cts/statsd/atom/DeviceAtomTestCase.java @@ -152,8 +152,9 @@ public class DeviceAtomTestCase extends AtomTestCase { * Gets the uid of the test app. */ protected int getUid() throws Exception { - String uidLine = getDevice().executeShellCommand("cmd package list packages -U " - + DEVICE_SIDE_TEST_PACKAGE); + int currentUser = getDevice().getCurrentUser(); + String uidLine = getDevice().executeShellCommand("cmd package list packages -U --user " + + currentUser + " " + DEVICE_SIDE_TEST_PACKAGE); String[] uidLineParts = uidLine.split(":"); // 3rd entry is package uid assertTrue(uidLineParts.length > 2); |