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