1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2016 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17 18<manifest xmlns:android="http://schemas.android.com/apk/res/android" 19 package="com.android.cts.net.hostside.app2"> 20 21 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 22 <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> 23 <uses-permission android:name="android.permission.INTERNET"/> 24 <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" /> 25 26 <!-- 27 This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store 28 them in a shared preferences which is then read by the test app. These broadcasts are 29 handled by 2 listeners, one defined the manifest and another dynamically registered by 30 a service. 31 32 The manifest-defined listener also handles ordered broadcasts used to share data with the 33 test app. 34 35 This application also provides a service, RemoteSocketFactoryService, that the test app can 36 use to open sockets to remote hosts as a different user ID. 37 --> 38 <application android:usesCleartextTraffic="true" 39 android:testOnly="true" 40 android:debuggable="true"> 41 42 <activity android:name=".MyActivity" 43 android:exported="true"/> 44 <service android:name=".MyService" 45 android:exported="true"/> 46 <service android:name=".MyForegroundService" 47 android:exported="true"/> 48 <service android:name=".RemoteSocketFactoryService" 49 android:exported="true"/> 50 51 <receiver android:name=".MyBroadcastReceiver" 52 android:exported="true"> 53 <intent-filter> 54 <action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED"/> 55 <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS"/> 56 <action android:name="com.android.cts.net.hostside.app2.action.GET_RESTRICT_BACKGROUND_STATUS"/> 57 <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK"/> 58 <action android:name="com.android.cts.net.hostside.app2.action.SEND_NOTIFICATION"/> 59 <action android:name="com.android.cts.net.hostside.app2.action.SHOW_TOAST"/> 60 </intent-filter> 61 </receiver> 62 <service android:name=".MyJobService" 63 android:permission="android.permission.BIND_JOB_SERVICE" /> 64 </application> 65 66 <!-- 67 Adding this to make sure that receiving the broadcast is not restricted by 68 package visibility restrictions. 69 --> 70 <queries> 71 <package android:name="android" /> 72 </queries> 73 74</manifest> 75