Add QUERY_ALL_PACKAGES to FrameworksNetTestsLib

Although the launcher should be visible due to the <queries> declaration
in the manifest, there are sometimes flakes indicating that the access
to the package was blocked due to visibility rules.

Try adding QUERY_ALL_PACKAGES to see whether it resolves the flakes.

Bug: 286550950
Test: atest
Change-Id: I24dcf19c040b63fea55f82db412ffcd40670e6fc
This commit is contained in:
Remi NGUYEN VAN 2023-09-19 15:32:21 +09:00
commit a52bd9f46d

View file

@ -49,6 +49,9 @@
<uses-permission android:name="android.permission.NETWORK_FACTORY" />
<uses-permission android:name="android.permission.NETWORK_STATS_PROVIDER" />
<uses-permission android:name="android.permission.CONTROL_OEM_PAID_NETWORK_PREFERENCE" />
<!-- Workaround for flakes where the launcher package is not found despite the <queries> tag
below (b/286550950). -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<!-- Declare the intent that the test intends to query. This is necessary for
UiDevice.getLauncherPackageName which is used in NetworkNotificationManagerTest