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
diff --git a/tests/unit/AndroidManifest.xml b/tests/unit/AndroidManifest.xml
index 5d4bdf7..2853f31 100644
--- a/tests/unit/AndroidManifest.xml
+++ b/tests/unit/AndroidManifest.xml
@@ -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