1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2014 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18     package="com.android.cts.managedprofile">
19
20    <uses-sdk android:minSdkVersion="29"/>
21    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
22    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
23    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
24    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
25    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
26    <uses-permission android:name="android.permission.BLUETOOTH"/>
27    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
28    <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/>
29    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
30    <uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
31    <uses-permission android:name="android.permission.READ_CONTACTS"/>
32    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
33    <uses-permission android:name="android.permission.CAMERA"/>
34    <uses-permission android:name="android.permission.CALL_PHONE"/>
35    <uses-permission android:name="android.permission.READ_CALL_LOG"/>
36    <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
37    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
38    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
39    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
40    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>
41    <uses-permission android:name="android.permission.READ_CALENDAR"/>
42    <uses-permission android:name="android.permission.WRITE_CALENDAR"/>
43    <uses-permission android:name="android.permission.REQUEST_PASSWORD_COMPLEXITY"/>
44    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
45    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
46
47    <application android:largeHeap="true"
48                 android:testOnly="true">
49        <uses-library android:name="android.test.runner"/>
50        <receiver android:name="com.android.cts.managedprofile.BaseManagedProfileTest$BasicAdminReceiver"
51             android:permission="android.permission.BIND_DEVICE_ADMIN"
52             android:exported="true">
53            <meta-data android:name="android.app.device_admin"
54                 android:resource="@xml/device_admin"/>
55            <intent-filter>
56                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
57            </intent-filter>
58        </receiver>
59        <receiver android:name="com.android.cts.managedprofile.PrimaryUserDeviceAdmin"
60             android:permission="android.permission.BIND_DEVICE_ADMIN"
61             android:exported="true">
62            <meta-data android:name="android.app.device_admin"
63                 android:resource="@xml/primary_device_admin"/>
64            <intent-filter>
65                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
66            </intent-filter>
67        </receiver>
68        <activity android:name=".PrimaryUserFilterSetterActivity"
69             android:exported="true">
70            <intent-filter>
71                <action android:name="android.intent.action.MAIN"/>
72                <category android:name="android.intent.category.DEFAULT"/>
73                <category android:name="android.intent.category.LAUNCHER"/>
74            </intent-filter>
75        </activity>
76        <activity android:name=".ComponentDisablingActivity"
77             android:exported="true">
78        </activity>
79        <activity android:name=".ManagedProfileActivity"
80             android:exported="true">
81            <intent-filter>
82                <category android:name="android.intent.category.DEFAULT"/>
83                <action android:name="com.android.cts.managedprofile.ACTION_TEST_MANAGED_ACTIVITY"/>
84            </intent-filter>
85            <intent-filter>
86                <action android:name="android.intent.action.SEND"/>
87                <action android:name="android.intent.action.SEND_MULTIPLE"/>
88                <data android:mimeType="*/*"/>
89                <category android:name="android.intent.category.DEFAULT"/>
90            </intent-filter>
91        </activity>
92        <activity android:name=".PrimaryUserActivity"
93             android:exported="true">
94            <intent-filter>
95                <category android:name="android.intent.category.DEFAULT"/>
96                <action android:name="com.android.cts.managedprofile.ACTION_TEST_PRIMARY_ACTIVITY"/>
97            </intent-filter>
98            <!-- Catch ACTION_PICK in case there is no other app handing it -->
99            <intent-filter>
100                <action android:name="android.intent.action.PICK"/>
101                <category android:name="android.intent.category.DEFAULT"/>
102            </intent-filter>
103        </activity>
104        <activity android:name=".AllUsersActivity"
105             android:exported="true">
106            <intent-filter>
107                <category android:name="android.intent.category.DEFAULT"/>
108                <action android:name="com.android.cts.managedprofile.ACTION_TEST_ALL_ACTIVITY"/>
109            </intent-filter>
110        </activity>
111        <activity android:name=".SetPolicyActivity"
112             android:launchMode="singleTop"
113             android:exported="true">
114            <intent-filter>
115                <action android:name="android.intent.action.MAIN"/>
116                <category android:name="android.intent.category.DEFAULT"/>
117            </intent-filter>
118        </activity>
119        <activity android:name=".TestActivity"/>
120
121        <service android:name=".TestConnectionService"
122             android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
123             android:exported="true">
124            <intent-filter>
125                <action android:name="android.telecom.ConnectionService"/>
126            </intent-filter>
127        </service>
128
129        <activity android:name=".TestDialerActivity"
130             android:exported="true">
131            <intent-filter>
132                <action android:name="android.intent.action.DIAL"/>
133                <category android:name="android.intent.category.DEFAULT"/>
134                <category android:name="android.intent.category.BROWSABLE"/>
135                <data android:mimeType="vnd.android.cursor.item/phone"/>
136                <data android:mimeType="vnd.android.cursor.item/person"/>
137            </intent-filter>
138            <intent-filter>
139                <action android:name="android.intent.action.DIAL"/>
140                <category android:name="android.intent.category.DEFAULT"/>
141            </intent-filter>
142            <intent-filter>
143                <action android:name="android.intent.action.VIEW"/>
144                <action android:name="android.intent.action.DIAL"/>
145                <category android:name="android.intent.category.DEFAULT"/>
146                <category android:name="android.intent.category.BROWSABLE"/>
147                <data android:scheme="tel"/>
148            </intent-filter>
149        </activity>
150        <service android:name=".AccountService"
151             android:exported="true">
152            <intent-filter>
153                <action android:name="android.accounts.AccountAuthenticator"/>
154            </intent-filter>
155            <meta-data android:name="android.accounts.AccountAuthenticator"
156                 android:resource="@xml/authenticator"/>
157        </service>
158        <activity android:name="com.android.compatibility.common.util.devicepolicy.provisioning.StartProvisioningActivity"/>
159
160        <activity android:name=".TimeoutActivity"
161             android:exported="true"/>
162
163        <activity android:name=".TestCrossProfileViewEventActivity"
164             android:exported="true">
165            <intent-filter>
166                <action android:name="android.provider.calendar.action.VIEW_MANAGED_PROFILE_CALENDAR_EVENT"/>
167                <category android:name="android.intent.category.DEFAULT"/>
168            </intent-filter>
169        </activity>
170
171        <service android:name=".CrossProfileNotificationListenerService"
172             android:label="CrossProfileNotificationListenerService"
173             android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
174             android:exported="true">
175            <intent-filter>
176                <action android:name="android.service.notification.NotificationListenerService"/>
177            </intent-filter>
178        </service>
179
180        <receiver android:name=".MissedCallNotificationReceiver"
181             android:exported="true">
182            <intent-filter>
183                <action android:name="android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION"/>
184            </intent-filter>
185        </receiver>
186
187        <!-- Test receiver that's decleared direct boot aware. This is needed to make the test app
188                         executable by instrumentation before device unlock -->
189        <receiver android:name=".ResetPasswordWithTokenTest$TestReceiver"
190             android:directBootAware="true"
191             android:exported="true">
192          <intent-filter>
193            <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED"/>
194          </intent-filter>
195        </receiver>
196
197        <receiver android:name=".LockProfileReceiver"
198             android:exported="true">
199          <intent-filter>
200            <action android:name="com.android.cts.managedprofile.LOCK_PROFILE"/>
201          </intent-filter>
202        </receiver>
203
204        <receiver android:name=".WipeDataReceiver"
205             android:exported="true">
206            <intent-filter>
207                <action android:name="com.android.cts.managedprofile.WIPE_DATA"/>
208                <action android:name="com.android.cts.managedprofile.WIPE_DATA_WITH_REASON"/>
209                <action android:name="com.android.cts.managedprofile.WIPE_DATA_WITHOUT_REASON"/>
210            </intent-filter>
211        </receiver>
212
213        <service android:name=".NotificationListener"
214             android:exported="true"
215             android:label="Notification Listener"
216             android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
217            <intent-filter>
218                <action android:name="android.service.notification.NotificationListenerService"/>
219            </intent-filter>
220        </service>
221
222    </application>
223
224    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
225         android:targetPackage="com.android.cts.managedprofile"
226         android:label="Managed Profile CTS Tests"/>
227</manifest>
228