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 --> 23 <permission android:name="com.android.cts.permissionWithSignature" 24 android:protectionLevel="signature" /> 25 <uses-permission android:name="com.android.cts.permissionWithSignature" /> 26 27 <!-- A permission this app will not hold. --> 28 <permission android:name="com.android.cts.permissionNotUsedWithSignature" 29 android:protectionLevel="signature" /> 30 31 <application> 32 <receiver android:name="GrantUriPermission" android:exported="true"> 33 </receiver> 34 <receiver android:name="SetInstallerPackage" android:exported="true"> 35 </receiver> 36 37 <!-- Need a way for another app to try to access the permission. So create a content 38 provider which is enforced by the permission --> 39 <provider android:name="PermissionContentProvider" 40 android:authorities="ctspermissionwithsignature" 41 android:readPermission="com.android.cts.permissionWithSignature" 42 android:writePermission="com.android.cts.permissionWithSignature"> 43 </provider> 44 45 <!-- Need a way for another app to try to access the permission, but will 46 grant uri access. --> 47 <provider android:name="PermissionContentProviderGranting" 48 android:authorities="ctspermissionwithsignaturegranting" 49 android:readPermission="com.android.cts.permissionWithSignature" 50 android:writePermission="com.android.cts.permissionWithSignature"> 51 <grant-uri-permission android:pathPattern="/foo.*" /> 52 <grant-uri-permission android:pathPattern="/yes.*" /> 53 </provider> 54 55 <!-- Nobody else should get access to this --> 56 <provider android:name="PrivateContentProvider" 57 android:authorities="ctsprivateprovider" 58 android:exported="false"> 59 </provider> 60 61 <!-- Nobody else should get access to this, but we will grant uri access --> 62 <provider android:name="PrivateContentProviderGranting" 63 android:authorities="ctsprivateprovidergranting" 64 android:exported="false"> 65 <grant-uri-permission android:pathPattern="/foo.*" /> 66 <grant-uri-permission android:pathPattern="/yes.*" /> 67 </provider> 68 69 <!-- Target for tests about how path permissions interact with granting 70 URI permissions. --> 71 <provider android:name="PermissionContentProviderPath" 72 android:authorities="ctspermissionwithsignaturepath" 73 android:readPermission="com.android.cts.permissionNotUsedWithSignature" 74 android:writePermission="com.android.cts.permissionNotUsedWithSignature"> 75 <path-permission 76 android:pathPrefix="/foo" 77 android:readPermission="com.android.cts.permissionWithSignature" 78 android:writePermission="com.android.cts.permissionWithSignature" /> 79 <path-permission 80 android:pathPrefix="/yes" 81 android:readPermission="com.android.cts.permissionWithSignature" 82 android:writePermission="com.android.cts.permissionWithSignature" /> 83 <grant-uri-permission android:pathPattern=".*" /> 84 </provider> 85 86 </application> 87 </manifest> 88