Brett Chabot | dd0aa01 | 2009-07-10 12:10:53 -0400 | [diff] [blame] | 1 | <?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 Chabot | dd0aa01 | 2009-07-10 12:10:53 -0400 | [diff] [blame] | 23 | <permission android:name="com.android.cts.permissionWithSignature" |
| 24 | android:protectionLevel="signature" /> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 25 | <uses-permission android:name="com.android.cts.permissionWithSignature" /> |
| 26 | |
Dianne Hackborn | 84310aa | 2010-09-27 22:03:52 -0700 | [diff] [blame] | 27 | <!-- A permission this app will not hold. --> |
| 28 | <permission android:name="com.android.cts.permissionNotUsedWithSignature" |
| 29 | android:protectionLevel="signature" /> |
| 30 | |
Jeff Sharkey | 082f61c | 2012-03-12 17:42:49 -0700 | [diff] [blame] | 31 | <permission android:name="com.android.cts.permissionNormal" /> |
| 32 | |
Brett Chabot | dd0aa01 | 2009-07-10 12:10:53 -0400 | [diff] [blame] | 33 | <application> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 34 | <receiver android:name="GrantUriPermission" android:exported="true"> |
| 35 | </receiver> |
Dianne Hackborn | 031ae84 | 2010-11-19 13:15:57 -0800 | [diff] [blame] | 36 | <receiver android:name="SetInstallerPackage" android:exported="true"> |
| 37 | </receiver> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 38 | |
Brett Chabot | dd0aa01 | 2009-07-10 12:10:53 -0400 | [diff] [blame] | 39 | <!-- 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 Kralevich | 380058b | 2012-07-27 18:34:02 -0700 | [diff] [blame] | 44 | android:writePermission="com.android.cts.permissionWithSignature" |
| 45 | android:exported="true"> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 46 | </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 Kralevich | 380058b | 2012-07-27 18:34:02 -0700 | [diff] [blame] | 53 | android:writePermission="com.android.cts.permissionWithSignature" |
| 54 | android:exported="true"> |
Dianne Hackborn | 84310aa | 2010-09-27 22:03:52 -0700 | [diff] [blame] | 55 | <grant-uri-permission android:pathPattern="/foo.*" /> |
| 56 | <grant-uri-permission android:pathPattern="/yes.*" /> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 57 | </provider> |
| 58 | |
| 59 | <!-- Nobody else should get access to this --> |
| 60 | <provider android:name="PrivateContentProvider" |
| 61 | android:authorities="ctsprivateprovider" |
| 62 | android:exported="false"> |
Dianne Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 63 | </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 Hackborn | 84310aa | 2010-09-27 22:03:52 -0700 | [diff] [blame] | 69 | <grant-uri-permission android:pathPattern="/foo.*" /> |
| 70 | <grant-uri-permission android:pathPattern="/yes.*" /> |
| 71 | </provider> |
| 72 | |
Nick Kralevich | 380058b | 2012-07-27 18:34:02 -0700 | [diff] [blame] | 73 | <!-- 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 Hackborn | 84310aa | 2010-09-27 22:03:52 -0700 | [diff] [blame] | 79 | <!-- 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 Kralevich | 380058b | 2012-07-27 18:34:02 -0700 | [diff] [blame] | 84 | android:writePermission="com.android.cts.permissionNotUsedWithSignature" |
| 85 | android:exported="true"> |
Dianne Hackborn | 84310aa | 2010-09-27 22:03:52 -0700 | [diff] [blame] | 86 | <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 Hackborn | 8c14cbb | 2010-08-18 16:01:06 -0700 | [diff] [blame] | 94 | <grant-uri-permission android:pathPattern=".*" /> |
| 95 | </provider> |
Jeff Sharkey | 082f61c | 2012-03-12 17:42:49 -0700 | [diff] [blame] | 96 | |
| 97 | <!-- Target for tests that verify path permissions can restrict access |
| 98 | when no default top-level permission. --> |
| 99 | <provider android:name="PermissionContentProviderPathRestricting" |
Nick Kralevich | 380058b | 2012-07-27 18:34:02 -0700 | [diff] [blame] | 100 | android:authorities="ctspermissionwithsignaturepathrestricting" |
| 101 | android:exported="true"> |
Jeff Sharkey | 082f61c | 2012-03-12 17:42:49 -0700 | [diff] [blame] | 102 | <!-- Require signature permission to get into path. --> |
| 103 | <path-permission |
Jeff Sharkey | 5d871c9 | 2012-05-04 16:51:46 -0700 | [diff] [blame] | 104 | android:pathPrefix="/foo" |
Jeff Sharkey | 082f61c | 2012-03-12 17:42:49 -0700 | [diff] [blame] | 105 | 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 Chabot | dd0aa01 | 2009-07-10 12:10:53 -0400 | [diff] [blame] | 114 | </application> |
| 115 | </manifest> |