Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 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" |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 19 | package="com.android.cts.net.hostside.app2"> |
Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 20 | |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 21 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> |
Dianne Hackborn | 568c73d | 2018-01-19 17:54:16 -0800 | [diff] [blame] | 22 | <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 23 | <uses-permission android:name="android.permission.INTERNET"/> |
Sudheer Shanka | 4a96c79 | 2021-02-18 06:06:50 -0800 | [diff] [blame] | 24 | <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" /> |
Julia Reynolds | b2018a3 | 2022-02-07 10:19:21 -0500 | [diff] [blame] | 25 | <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> |
Felipe Leme | a0f49f2 | 2016-02-18 10:43:54 -0800 | [diff] [blame] | 26 | |
| 27 | <!-- |
Sudheer Shanka | 4a96c79 | 2021-02-18 06:06:50 -0800 | [diff] [blame] | 28 | This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store |
| 29 | them in a shared preferences which is then read by the test app. These broadcasts are |
| 30 | handled by 2 listeners, one defined the manifest and another dynamically registered by |
| 31 | a service. |
Felipe Leme | a0f49f2 | 2016-02-18 10:43:54 -0800 | [diff] [blame] | 32 | |
Sudheer Shanka | 4a96c79 | 2021-02-18 06:06:50 -0800 | [diff] [blame] | 33 | The manifest-defined listener also handles ordered broadcasts used to share data with the |
| 34 | test app. |
Lorenzo Colitti | cbcfb98 | 2016-04-15 16:27:49 +0900 | [diff] [blame] | 35 | |
Sudheer Shanka | 4a96c79 | 2021-02-18 06:06:50 -0800 | [diff] [blame] | 36 | This application also provides a service, RemoteSocketFactoryService, that the test app can |
| 37 | use to open sockets to remote hosts as a different user ID. |
| 38 | --> |
| 39 | <application android:usesCleartextTraffic="true" |
Sudheer Shanka | a723fbd | 2021-03-03 21:18:58 -0800 | [diff] [blame] | 40 | android:testOnly="true" |
| 41 | android:debuggable="true"> |
Sudheer Shanka | 4a96c79 | 2021-02-18 06:06:50 -0800 | [diff] [blame] | 42 | |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 43 | <activity android:name=".MyActivity" |
| 44 | android:exported="true"/> |
| 45 | <service android:name=".MyService" |
| 46 | android:exported="true"/> |
| 47 | <service android:name=".MyForegroundService" |
| 48 | android:exported="true"/> |
| 49 | <service android:name=".RemoteSocketFactoryService" |
| 50 | android:exported="true"/> |
Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 51 | |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 52 | <receiver android:name=".MyBroadcastReceiver" |
| 53 | android:exported="true"> |
Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 54 | <intent-filter> |
Ashwini Oruganti | 9503eb2 | 2020-05-29 16:14:30 -0700 | [diff] [blame] | 55 | <action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED"/> |
| 56 | <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS"/> |
| 57 | <action android:name="com.android.cts.net.hostside.app2.action.GET_RESTRICT_BACKGROUND_STATUS"/> |
| 58 | <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK"/> |
| 59 | <action android:name="com.android.cts.net.hostside.app2.action.SEND_NOTIFICATION"/> |
| 60 | <action android:name="com.android.cts.net.hostside.app2.action.SHOW_TOAST"/> |
Felipe Leme | 4188bc3 | 2016-05-23 16:10:07 -0700 | [diff] [blame] | 61 | </intent-filter> |
Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 62 | </receiver> |
Sudheer Shanka | 51691d6 | 2021-01-15 12:25:15 -0800 | [diff] [blame] | 63 | <service android:name=".MyJobService" |
| 64 | android:permission="android.permission.BIND_JOB_SERVICE" /> |
Felipe Leme | 5b35136 | 2016-01-27 14:49:54 -0800 | [diff] [blame] | 65 | </application> |
| 66 | |
Sudheer Shanka | 7bbbdbd | 2021-06-03 10:38:38 -0700 | [diff] [blame] | 67 | <!-- |
| 68 | Adding this to make sure that receiving the broadcast is not restricted by |
| 69 | package visibility restrictions. |
| 70 | --> |
| 71 | <queries> |
| 72 | <package android:name="android" /> |
| 73 | </queries> |
| 74 | |
Lorenzo Colitti | cbcfb98 | 2016-04-15 16:27:49 +0900 | [diff] [blame] | 75 | </manifest> |