Commit 97f684a5 authored by Nicholas Sauer's avatar Nicholas Sauer
Browse files

Fix HarmfulAppWarningTest for secondary users.

Use cmd pm list packages instead of getAppPackageInfo to check if the app was actually
uninstalled for the current user. getAppPackageInfo uses dumpsys packages to list packages.
If two or more users exist on the device, the package still appears in the list, causing the
test to fail. Using cmd package list packages with the --user parameter will show only packages
installed for the current user.

For background on running CTS on secondary users, see go/aae-cts-on-u10

bug: 124493566
Test: cts-tradefed run cts-dev -a arm64-v8a -m CtsHarmfulAppWarningHostTestCases
On a prod pi phone, with both one and two users.

Change-Id: Id6cf0bd49615ab85df1dc565dd75f8297fc7d446
parent 796f2b72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment