1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4 * Copyright (C) 2019 The Android Open Source Project 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18--> 19 20<manifest xmlns:android="http://schemas.android.com/apk/res/android" 21 package="com.android.server.net.integrationtests"> 22 23 <!-- For ConnectivityService registerReceiverAsUser (receiving broadcasts) --> 24 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/> 25 <!-- PermissionMonitor sets network permissions for each user --> 26 <uses-permission android:name="android.permission.MANAGE_USERS"/> 27 <!-- ConnectivityService sends notifications to BatteryStats --> 28 <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS"/> 29 <!-- Reading network status --> 30 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 31 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 32 <uses-permission android:name="android.permission.NETWORK_FACTORY"/> 33 <!-- Obtain LinkProperties callbacks with sensitive fields --> 34 <uses-permission android:name="android.permission.NETWORK_SETTINGS" /> 35 <uses-permission android:name="android.permission.NETWORK_STACK"/> 36 <uses-permission android:name="android.permission.OBSERVE_NETWORK_POLICY"/> 37 <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/> 38 <!-- Reading DeviceConfig flags --> 39 <uses-permission android:name="android.permission.READ_DEVICE_CONFIG"/> 40 <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> 41 <!-- Querying the resources package --> 42 <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> 43 <!-- Register UidFrozenStateChangedCallback --> 44 <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/> 45 <!-- Permission required for CTS test - NetworkStatsIntegrationTest --> 46 <uses-permission android:name="android.permission.INTERNET"/> 47 <uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/> 48 <application android:debuggable="true"> 49 <uses-library android:name="android.test.runner"/> 50 51 <!-- This manifest is merged with the base manifest of the real NetworkStack app. 52 Remove the NetworkStackService from the base (real) manifest, and replace with a test 53 service that responds to the same intent --> 54 <service android:name=".TestNetworkStackService" 55 android:process="com.android.server.net.integrationtests.testnetworkstack" 56 android:exported="true"> 57 <intent-filter> 58 <action android:name="android.net.INetworkStackConnector.Test"/> 59 </intent-filter> 60 </service> 61 <service android:name=".NetworkStackInstrumentationService" 62 android:process="com.android.server.net.integrationtests.testnetworkstack" 63 android:exported="true"> 64 <intent-filter> 65 <action android:name=".INetworkStackInstrumentation"/> 66 </intent-filter> 67 </service> 68 <service android:name="com.android.networkstack.ipmemorystore.RegularMaintenanceJobService" 69 android:process="com.android.server.net.integrationtests.testnetworkstack" 70 android:permission="android.permission.BIND_JOB_SERVICE"/> 71 72 </application> 73 74 <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" 75 android:targetPackage="com.android.server.net.integrationtests" 76 android:label="Frameworks Net Integration Tests"/> 77 78</manifest> 79