Home | History | Annotate | Download | only in MtpDocumentsProvider
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      3           package="com.android.mtp"
      4           android:sharedUserId="android.media">
      5     <uses-feature android:name="android.hardware.usb.host" />
      6     <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
      7     <uses-permission android:name="android.permission.MANAGE_USB" />
      8     <application android:label="@string/app_label">
      9         <provider
     10             android:name=".MtpDocumentsProvider"
     11             android:authorities="com.android.mtp.documents"
     12             android:grantUriPermissions="true"
     13             android:exported="true"
     14             android:permission="android.permission.MANAGE_DOCUMENTS">
     15             <intent-filter>
     16                 <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
     17             </intent-filter>
     18         </provider>
     19 
     20         <service android:name=".MtpDocumentsService" />
     21 
     22         <activity android:name=".ReceiverActivity"
     23                   android:label="@string/downloads_app_label"
     24                   android:icon="@mipmap/ic_launcher_download"
     25                   android:theme="@android:style/Theme.NoDisplay"
     26                   android:excludeFromRecents="true">
     27             <intent-filter>
     28                 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
     29             </intent-filter>
     30             <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
     31                        android:resource="@xml/device_filter" />
     32         </activity>
     33 
     34         <receiver android:name=".UsbIntentReceiver" android:exported="true">
     35             <intent-filter>
     36                 <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
     37                 <action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
     38             </intent-filter>
     39             <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
     40                        android:resource="@xml/device_filter" />
     41         </receiver>
     42     </application>
     43 </manifest>
     44