blob: 2c2d957d1ae5cfd6cf709cff7b76fbb4d8e65ac5 [file] [log] [blame]
Felipe Leme5b351362016-01-27 14:49:54 -08001<?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 Oruganti9503eb22020-05-29 16:14:30 -070019 package="com.android.cts.net.hostside.app2">
Felipe Leme5b351362016-01-27 14:49:54 -080020
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070021 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Dianne Hackborn568c73d2018-01-19 17:54:16 -080022 <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
Hui Yu94302eb2022-12-14 22:58:11 +000023 <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070024 <uses-permission android:name="android.permission.INTERNET"/>
Sudheer Shanka4a96c792021-02-18 06:06:50 -080025 <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
Julia Reynoldsb2018a32022-02-07 10:19:21 -050026 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Felipe Lemea0f49f22016-02-18 10:43:54 -080027
28 <!--
Sudheer Shanka4a96c792021-02-18 06:06:50 -080029 This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store
30 them in a shared preferences which is then read by the test app. These broadcasts are
31 handled by 2 listeners, one defined the manifest and another dynamically registered by
32 a service.
Felipe Lemea0f49f22016-02-18 10:43:54 -080033
Sudheer Shanka4a96c792021-02-18 06:06:50 -080034 The manifest-defined listener also handles ordered broadcasts used to share data with the
35 test app.
Lorenzo Colitticbcfb982016-04-15 16:27:49 +090036
Sudheer Shanka4a96c792021-02-18 06:06:50 -080037 This application also provides a service, RemoteSocketFactoryService, that the test app can
38 use to open sockets to remote hosts as a different user ID.
39 -->
40 <application android:usesCleartextTraffic="true"
Sudheer Shankaa723fbd2021-03-03 21:18:58 -080041 android:testOnly="true"
42 android:debuggable="true">
Sudheer Shanka4a96c792021-02-18 06:06:50 -080043
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070044 <activity android:name=".MyActivity"
45 android:exported="true"/>
46 <service android:name=".MyService"
47 android:exported="true"/>
48 <service android:name=".MyForegroundService"
Hui Yu94302eb2022-12-14 22:58:11 +000049 android:foregroundServiceType="specialUse"
50 android:exported="true">
51 <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
52 android:value="Connectivity" />
53 </service>
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070054 <service android:name=".RemoteSocketFactoryService"
55 android:exported="true"/>
Felipe Leme5b351362016-01-27 14:49:54 -080056
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070057 <receiver android:name=".MyBroadcastReceiver"
58 android:exported="true">
Felipe Leme5b351362016-01-27 14:49:54 -080059 <intent-filter>
Ashwini Oruganti9503eb22020-05-29 16:14:30 -070060 <action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED"/>
61 <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS"/>
62 <action android:name="com.android.cts.net.hostside.app2.action.GET_RESTRICT_BACKGROUND_STATUS"/>
63 <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK"/>
64 <action android:name="com.android.cts.net.hostside.app2.action.SEND_NOTIFICATION"/>
65 <action android:name="com.android.cts.net.hostside.app2.action.SHOW_TOAST"/>
Felipe Leme4188bc32016-05-23 16:10:07 -070066 </intent-filter>
Felipe Leme5b351362016-01-27 14:49:54 -080067 </receiver>
Sudheer Shanka51691d62021-01-15 12:25:15 -080068 <service android:name=".MyJobService"
69 android:permission="android.permission.BIND_JOB_SERVICE" />
Felipe Leme5b351362016-01-27 14:49:54 -080070 </application>
71
Sudheer Shanka7bbbdbd2021-06-03 10:38:38 -070072 <!--
73 Adding this to make sure that receiving the broadcast is not restricted by
74 package visibility restrictions.
75 -->
76 <queries>
77 <package android:name="android" />
78 </queries>
79
Lorenzo Colitticbcfb982016-04-15 16:27:49 +090080</manifest>