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
Loading
Please sign in to comment