blob: 9188993a97c2951bb5cf883c7457d21fcdb9b3eb [file] [log] [blame]
Brett Chabotdd0aa012009-07-10 12:10:53 -04001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2009 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<manifest xmlns:android="http://schemas.android.com/apk/res/android"
17 package="com.android.cts.permissiondeclareapp">
18
19 <!--
20 An app that declares a permission that requires a matching signature to
21 access.
22 -->
Brett Chabotdd0aa012009-07-10 12:10:53 -040023 <permission android:name="com.android.cts.permissionWithSignature"
24 android:protectionLevel="signature" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070025 <uses-permission android:name="com.android.cts.permissionWithSignature" />
Ricky Wai374e9682019-05-31 12:50:42 +010026 <!-- To enable the app to start activities from the background. -->
27 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070028
Dianne Hackborn84310aa2010-09-27 22:03:52 -070029 <!-- A permission this app will not hold. -->
30 <permission android:name="com.android.cts.permissionNotUsedWithSignature"
31 android:protectionLevel="signature" />
32
Jeff Sharkey082f61c2012-03-12 17:42:49 -070033 <permission android:name="com.android.cts.permissionNormal" />
34
Brett Chabotdd0aa012009-07-10 12:10:53 -040035 <application>
Jeff Sharkey12f701b2018-02-25 14:43:35 -070036 <provider android:name="UtilsProvider"
37 android:authorities="com.android.cts.permissiondeclareapp"
38 android:exported="true" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070039
Brett Chabotdd0aa012009-07-10 12:10:53 -040040 <!-- Need a way for another app to try to access the permission. So create a content
41 provider which is enforced by the permission -->
42 <provider android:name="PermissionContentProvider"
43 android:authorities="ctspermissionwithsignature"
44 android:readPermission="com.android.cts.permissionWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070045 android:writePermission="com.android.cts.permissionWithSignature"
46 android:exported="true">
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070047 </provider>
48
49 <!-- Need a way for another app to try to access the permission, but will
50 grant uri access. -->
51 <provider android:name="PermissionContentProviderGranting"
52 android:authorities="ctspermissionwithsignaturegranting"
53 android:readPermission="com.android.cts.permissionWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070054 android:writePermission="com.android.cts.permissionWithSignature"
55 android:exported="true">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070056 <grant-uri-permission android:pathPattern="/foo.*" />
57 <grant-uri-permission android:pathPattern="/yes.*" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070058 </provider>
59
60 <!-- Nobody else should get access to this -->
61 <provider android:name="PrivateContentProvider"
62 android:authorities="ctsprivateprovider"
63 android:exported="false">
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070064 </provider>
65
66 <!-- Nobody else should get access to this, but we will grant uri access -->
67 <provider android:name="PrivateContentProviderGranting"
68 android:authorities="ctsprivateprovidergranting"
69 android:exported="false">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070070 <grant-uri-permission android:pathPattern="/foo.*" />
71 <grant-uri-permission android:pathPattern="/yes.*" />
72 </provider>
73
Nick Kralevich380058b2012-07-27 18:34:02 -070074 <!-- An ambiguous content provider, where "exported" was not specified.
75 Nobody should get access to this. -->
76 <provider android:name="AmbiguousContentProvider"
77 android:authorities="ctsambiguousprovider">
78 </provider>
79
Dianne Hackborn84310aa2010-09-27 22:03:52 -070080 <!-- Target for tests about how path permissions interact with granting
81 URI permissions. -->
82 <provider android:name="PermissionContentProviderPath"
83 android:authorities="ctspermissionwithsignaturepath"
84 android:readPermission="com.android.cts.permissionNotUsedWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070085 android:writePermission="com.android.cts.permissionNotUsedWithSignature"
86 android:exported="true">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070087 <path-permission
88 android:pathPrefix="/foo"
89 android:readPermission="com.android.cts.permissionWithSignature"
90 android:writePermission="com.android.cts.permissionWithSignature" />
91 <path-permission
92 android:pathPrefix="/yes"
93 android:readPermission="com.android.cts.permissionWithSignature"
94 android:writePermission="com.android.cts.permissionWithSignature" />
Jeff Sharkeyc0f81612019-06-06 10:53:15 -060095 <grant-uri-permission android:pathPattern="/foo.*" />
96 <grant-uri-permission android:pathPattern="/yes.*" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070097 </provider>
Jeff Sharkey082f61c2012-03-12 17:42:49 -070098
99 <!-- Target for tests that verify path permissions can restrict access
100 when no default top-level permission. -->
101 <provider android:name="PermissionContentProviderPathRestricting"
Nick Kralevich380058b2012-07-27 18:34:02 -0700102 android:authorities="ctspermissionwithsignaturepathrestricting"
103 android:exported="true">
Jeff Sharkey082f61c2012-03-12 17:42:49 -0700104 <!-- Require signature permission to get into path. -->
105 <path-permission
Jeff Sharkey5d871c92012-05-04 16:51:46 -0700106 android:pathPrefix="/foo"
Jeff Sharkey082f61c2012-03-12 17:42:49 -0700107 android:readPermission="com.android.cts.permissionWithSignature"
108 android:writePermission="com.android.cts.permissionWithSignature" />
109 <!-- Allow access to a specific path inside. -->
110 <path-permission
111 android:pathPrefix="/foo/bar"
112 android:readPermission="com.android.cts.permissionNormal"
113 android:writePermission="com.android.cts.permissionNormal" />
114 </provider>
115
Jeff Sharkeyc0f81612019-06-06 10:53:15 -0600116 <activity android:name=".SendResultActivity" android:exported="true" />
Brett Chabotdd0aa012009-07-10 12:10:53 -0400117 </application>
118</manifest>