Turn MtpDocumentsService foreground when devices are opend.
BUG=26047393
Change-Id: I70f69c5ddec500ed61d1a76fb9e2e296813b2a4e
diff --git a/packages/MtpDocumentsProvider/AndroidManifest.xml b/packages/MtpDocumentsProvider/AndroidManifest.xml
index 0172a4f..3861d78 100644
--- a/packages/MtpDocumentsProvider/AndroidManifest.xml
+++ b/packages/MtpDocumentsProvider/AndroidManifest.xml
@@ -15,17 +15,14 @@
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</provider>
- <activity android:name=".ReceiverActivity"
- android:theme="@android:style/Theme.NoDisplay"
- android:screenOrientation="locked"
- android:excludeFromRecents="true"
- android:enabled="false">
+ <service android:name=".MtpDocumentsService" />
+ <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" />
- </activity>
- <service android:name=".MtpDocumentsService"></service>
+ android:resource="@xml/device_filter" />
+ </receiver>
</application>
</manifest>