Daichi Hirono fda7474c5f Open MTP device on demand.
Previously MtpDocumentsProvider opens a device just after device is
connected to Android. But MtpDocumentsProvider should open MTP device on
demand so that other applications can open device if user starts to use
the application before using MtpDocumentsProvider.

BUG=26625708

Change-Id: I6083b8c7cef49ee6e9fb0d15ca4adc129734f3eb
2016-02-04 12:45:58 +09:00

42 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.mtp"
android:sharedUserId="android.media">
<uses-feature android:name="android.hardware.usb.host" />
<uses-permission android:name="android.permission.MANAGE_USB" />
<application android:label="@string/app_label">
<provider
android:name=".MtpDocumentsProvider"
android:authorities="com.android.mtp.documents"
android:grantUriPermissions="true"
android:exported="true"
android:permission="android.permission.MANAGE_DOCUMENTS">
<intent-filter>
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</provider>
<service android:name=".MtpDocumentsService" />
<activity android:name=".ReceiverActivity"
android:theme="@android:style/Theme.NoDisplay"
android:screenOrientation="locked"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
<receiver android:name=".UsbIntentReceiver" android:exported="true">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</receiver>
</application>
</manifest>