1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 * Copyright (C) 2011 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="android.admin.app">
20    <uses-sdk android:minSdkVersion="19"
21         android:targetSdkVersion="28"/>
22
23    <application android:testOnly="true">
24
25        <uses-library android:name="android.test.runner"/>
26
27        <receiver android:name="android.admin.app.CtsDeviceAdminDeviceOwner"
28             android:permission="android.permission.BIND_DEVICE_ADMIN"
29             android:exported="true">
30            <meta-data android:name="android.app.device_admin"
31                 android:resource="@xml/device_admin"/>
32            <intent-filter>
33                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
34            </intent-filter>
35        </receiver>
36
37        <receiver android:name="android.admin.app.CtsDeviceAdminProfileOwner"
38             android:permission="android.permission.BIND_DEVICE_ADMIN"
39             android:exported="true">
40            <meta-data android:name="android.app.device_admin"
41                 android:resource="@xml/device_admin"/>
42            <intent-filter>
43                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
44            </intent-filter>
45        </receiver>
46
47        <receiver android:name="android.admin.app.CtsDeviceAdminReceiver"
48             android:permission="android.permission.BIND_DEVICE_ADMIN"
49             android:exported="true">
50            <meta-data android:name="android.app.device_admin"
51                 android:resource="@xml/device_admin"/>
52            <intent-filter>
53                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
54            </intent-filter>
55        </receiver>
56
57        <receiver android:name="android.admin.app.CtsDeviceAdminReceiver2"
58             android:permission="android.permission.BIND_DEVICE_ADMIN"
59             android:exported="true">
60            <meta-data android:name="android.app.device_admin"
61                 android:resource="@xml/device_admin_2"/>
62            <intent-filter>
63                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
64            </intent-filter>
65        </receiver>
66
67        <receiver android:name="android.admin.app.CtsDeviceAdminReceiver3"
68             android:permission="android.permission.BIND_DEVICE_ADMIN"
69             android:exported="true">
70            <meta-data android:name="android.app.device_admin"
71                 android:resource="@xml/device_admin_3"/>
72            <intent-filter>
73                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
74            </intent-filter>
75        </receiver>
76
77        <receiver android:name="android.admin.app.CtsDeviceAdminReceiverVisible"
78             android:permission="android.permission.BIND_DEVICE_ADMIN"
79             android:exported="true">
80            <meta-data android:name="android.app.device_admin"
81                 android:resource="@xml/device_admin_visible"/>
82            <intent-filter>
83                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
84            </intent-filter>
85        </receiver>
86
87        <receiver android:name="android.admin.app.CtsDeviceAdminReceiverInvisible"
88             android:permission="android.permission.BIND_DEVICE_ADMIN"
89             android:exported="true">
90            <meta-data android:name="android.app.device_admin"
91                 android:resource="@xml/device_admin_invisible"/>
92            <intent-filter>
93                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
94            </intent-filter>
95        </receiver>
96
97        <!-- Device Admin that needs to be in the deactivated state in order
98                         for tests to pass. -->
99        <receiver android:name="android.admin.app.CtsDeviceAdminDeactivatedReceiver"
100             android:permission="android.permission.BIND_DEVICE_ADMIN"
101             android:exported="true">
102            <meta-data android:name="android.app.device_admin"
103                 android:resource="@xml/device_admin"/>
104            <intent-filter>
105                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
106            </intent-filter>
107        </receiver>
108
109        <!-- Helper Activity used by Device Admin activation tests -->
110        <activity android:name="android.admin.app.CtsDeviceAdminActivationTestActivity"
111             android:label="Device Admin activation test"/>
112
113        <!-- Broken device admin: meta-data missing -->
114        <receiver android:name="android.admin.app.CtsDeviceAdminBrokenReceiver"
115             android:permission="android.permission.BIND_DEVICE_ADMIN"
116             android:exported="true">
117            <intent-filter>
118                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
119            </intent-filter>
120        </receiver>
121
122        <!-- Broken device admin: filter doesn't match an Intent with action
123                         android.app.action.DEVICE_ADMIN_ENABLED and nothing else (e.g.,
124                         data) set -->
125        <receiver android:name="android.admin.app.CtsDeviceAdminBrokenReceiver2"
126             android:permission="android.permission.BIND_DEVICE_ADMIN"
127             android:exported="true">
128            <meta-data android:name="android.app.device_admin"
129                 android:resource="@xml/device_admin"/>
130            <intent-filter>
131                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
132                <data android:scheme="https"/>
133            </intent-filter>
134        </receiver>
135
136        <!-- Broken device admin: meta-data element doesn't point to valid
137                         Device Admin configuration/description -->
138        <receiver android:name="android.admin.app.CtsDeviceAdminBrokenReceiver3"
139             android:permission="android.permission.BIND_DEVICE_ADMIN"
140             android:exported="true">
141            <meta-data android:name="android.app.device_admin"
142                 android:resource="@xml/broken_device_admin"/>
143            <intent-filter>
144                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>
145            </intent-filter>
146        </receiver>
147
148        <!-- Broken device admin: filter doesn't match Intents with action
149                         android.app.action.DEVICE_ADMIN_ENABLED -->
150        <receiver android:name="android.admin.app.CtsDeviceAdminBrokenReceiver4"
151             android:permission="android.permission.BIND_DEVICE_ADMIN"
152             android:exported="true">
153            <meta-data android:name="android.app.device_admin"
154                 android:resource="@xml/device_admin"/>
155            <intent-filter>
156                <action android:name="android.app.action.DEVICE_ADMIN_DISABLED"/>
157            </intent-filter>
158        </receiver>
159
160        <!-- Broken device admin: no intent-filter -->
161        <receiver android:name="android.admin.app.CtsDeviceAdminBrokenReceiver5"
162             android:permission="android.permission.BIND_DEVICE_ADMIN">
163            <meta-data android:name="android.app.device_admin"
164                 android:resource="@xml/device_admin"/>
165        </receiver>
166
167    </application>
168
169</manifest>
170