chromium/components/cronet/android/test/javatests/AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            package="org.chromium.net.tests"
            android:versionCode="1"
            android:versionName="1.0"
            tools:ignore="ScopedStorage">
    <!-- tools:ignore="ScopedStorage" stops the linter from yelling at us for
         bypassing Scoped Storage. -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RUN_INSTRUMENTATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- Starting from Android 11 not all packages are visible by default and this stops us
         from starting an EmbeddedTestServer. Request visibility by using an intent
         filter signature
         (https://developer.android.com/training/package-visibility/declaring#intent-filter-signature)
    -->
    <queries>
      <intent>
        <action android:name="org.chromium.net.test.EMBEDDED_TEST_SERVER_SERVICE" />
      </intent>
    </queries>

    <!-- Starting from Android 10, requestLegacyExternalStorage is required to
         fetch test data, certificates, etc.. They currently reside in external
         storage which is no longer accessible by default.
         https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage
         Once we start testing Android 11+, this "hack" might no longer be sufficient. -->
    <application android:name="org.chromium.net.CronetTestApplication"
                 android:label="Cronet Test"
                 android:networkSecurityConfig="@xml/network_security_config"
                 android:requestLegacyExternalStorage="true">
      <!-- Disables at startup init of Emoji2. See crbug.com/1393109. -->
      <provider android:name="androidx.startup.InitializationProvider"
                tools:node="remove" />

        <!--
          Run the real telemetry code in test/sample code to improve
          coverage
        -->
        <service
          android:name="android.net.http.MetaDataHolder"
          android:enabled="false" android:exported="false">
            <meta-data
              android:name="android.net.http.EnableTelemetry"
              android:value="true" />
        </service>
    </application>
    <!-- Does not use BaseChromiumAndroidJUnitRunner so that it's easy to run
         tests when dropped into non-chromium repositories. -->
    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
                     android:targetPackage="org.chromium.net.tests"
                     android:label="Tests for org.chromium.net" />
</manifest>