blob: ad7a64023b2af108582d434f1dabb64099139302 [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" />
26
Dianne Hackborn84310aa2010-09-27 22:03:52 -070027 <!-- A permission this app will not hold. -->
28 <permission android:name="com.android.cts.permissionNotUsedWithSignature"
29 android:protectionLevel="signature" />
30
Jeff Sharkey082f61c2012-03-12 17:42:49 -070031 <permission android:name="com.android.cts.permissionNormal" />
32
Brett Chabotdd0aa012009-07-10 12:10:53 -040033 <application>
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070034 <receiver android:name="GrantUriPermission" android:exported="true">
35 </receiver>
Dianne Hackborn031ae842010-11-19 13:15:57 -080036 <receiver android:name="SetInstallerPackage" android:exported="true">
37 </receiver>
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070038
Brett Chabotdd0aa012009-07-10 12:10:53 -040039 <!-- Need a way for another app to try to access the permission. So create a content
40 provider which is enforced by the permission -->
41 <provider android:name="PermissionContentProvider"
42 android:authorities="ctspermissionwithsignature"
43 android:readPermission="com.android.cts.permissionWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070044 android:writePermission="com.android.cts.permissionWithSignature"
45 android:exported="true">
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070046 </provider>
47
48 <!-- Need a way for another app to try to access the permission, but will
49 grant uri access. -->
50 <provider android:name="PermissionContentProviderGranting"
51 android:authorities="ctspermissionwithsignaturegranting"
52 android:readPermission="com.android.cts.permissionWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070053 android:writePermission="com.android.cts.permissionWithSignature"
54 android:exported="true">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070055 <grant-uri-permission android:pathPattern="/foo.*" />
56 <grant-uri-permission android:pathPattern="/yes.*" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070057 </provider>
58
59 <!-- Nobody else should get access to this -->
60 <provider android:name="PrivateContentProvider"
61 android:authorities="ctsprivateprovider"
62 android:exported="false">
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070063 </provider>
64
65 <!-- Nobody else should get access to this, but we will grant uri access -->
66 <provider android:name="PrivateContentProviderGranting"
67 android:authorities="ctsprivateprovidergranting"
68 android:exported="false">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070069 <grant-uri-permission android:pathPattern="/foo.*" />
70 <grant-uri-permission android:pathPattern="/yes.*" />
71 </provider>
72
Nick Kralevich380058b2012-07-27 18:34:02 -070073 <!-- An ambiguous content provider, where "exported" was not specified.
74 Nobody should get access to this. -->
75 <provider android:name="AmbiguousContentProvider"
76 android:authorities="ctsambiguousprovider">
77 </provider>
78
Dianne Hackborn84310aa2010-09-27 22:03:52 -070079 <!-- Target for tests about how path permissions interact with granting
80 URI permissions. -->
81 <provider android:name="PermissionContentProviderPath"
82 android:authorities="ctspermissionwithsignaturepath"
83 android:readPermission="com.android.cts.permissionNotUsedWithSignature"
Nick Kralevich380058b2012-07-27 18:34:02 -070084 android:writePermission="com.android.cts.permissionNotUsedWithSignature"
85 android:exported="true">
Dianne Hackborn84310aa2010-09-27 22:03:52 -070086 <path-permission
87 android:pathPrefix="/foo"
88 android:readPermission="com.android.cts.permissionWithSignature"
89 android:writePermission="com.android.cts.permissionWithSignature" />
90 <path-permission
91 android:pathPrefix="/yes"
92 android:readPermission="com.android.cts.permissionWithSignature"
93 android:writePermission="com.android.cts.permissionWithSignature" />
Dianne Hackborn8c14cbb2010-08-18 16:01:06 -070094 <grant-uri-permission android:pathPattern=".*" />
95 </provider>
Jeff Sharkey082f61c2012-03-12 17:42:49 -070096
97 <!-- Target for tests that verify path permissions can restrict access
98 when no default top-level permission. -->
99 <provider android:name="PermissionContentProviderPathRestricting"
Nick Kralevich380058b2012-07-27 18:34:02 -0700100 android:authorities="ctspermissionwithsignaturepathrestricting"
101 android:exported="true">
Jeff Sharkey082f61c2012-03-12 17:42:49 -0700102 <!-- Require signature permission to get into path. -->
103 <path-permission
Jeff Sharkey5d871c92012-05-04 16:51:46 -0700104 android:pathPrefix="/foo"
Jeff Sharkey082f61c2012-03-12 17:42:49 -0700105 android:readPermission="com.android.cts.permissionWithSignature"
106 android:writePermission="com.android.cts.permissionWithSignature" />
107 <!-- Allow access to a specific path inside. -->
108 <path-permission
109 android:pathPrefix="/foo/bar"
110 android:readPermission="com.android.cts.permissionNormal"
111 android:writePermission="com.android.cts.permissionNormal" />
112 </provider>
113
Brett Chabotdd0aa012009-07-10 12:10:53 -0400114 </application>
115</manifest>