Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 268dc205 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Migrate MTP components into new project."

parents 28518542 880d3be3
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
android_app {
    name: "MtpDocumentsProvider",

    srcs: ["src/**/*.java"],
    platform_apis: true,
    certificate: "media",
    privileged: true,
    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },
}
+0 −43
Original line number Diff line number Diff line
<?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.FOREGROUND_SERVICE"/>
    <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:label="@string/downloads_app_label"
                  android:icon="@mipmap/ic_launcher_download"
                  android:theme="@android:style/Theme.NoDisplay"
                  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>
+1 −0
Original line number Diff line number Diff line
../../../../packages/services/Mtp
+0 −13
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
LOCAL_PACKAGE_NAME := MtpDocumentsProviderPerfTests
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_INSTRUMENTATION_FOR := MtpDocumentsProvider
LOCAL_CERTIFICATE := media
LOCAL_COMPATIBILITY_SUITE += device-tests

include $(BUILD_PACKAGE)
+0 −13
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.mtp.perftests"
    android:sharedUserId="android.media">

    <application>
        <uses-library android:name="android.test.runner" />
    </application>

    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
        android:targetPackage="com.android.mtp"
        android:label="Performance tests for MtpDocumentsProvider." />
</manifest>
Loading