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

Commit 04774355 authored by Phil Burk's avatar Phil Burk Committed by Android (Google) Code Review
Browse files

Merge "BluetoothMidi test: test encoder and decoder"

parents 1caaa197 0a59ca24
Loading
Loading
Loading
Loading
+30 −1
Original line number Diff line number Diff line
//
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

android_library {
    name: "BluetoothMidiLib",
    srcs: [
        "src/**/*.java",
    ],
    platform_apis: true,
    plugins: ["java_api_finder"],
    manifest: "AndroidManifestBase.xml",
}

android_app {
    name: "BluetoothMidiService",
    srcs: ["src/**/*.java"],
    srcs: [
        "src/**/*.java",
    ],
    platform_apis: true,
    certificate: "platform",
    manifest: "AndroidManifest.xml",
}
+26 −3
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.bluetoothmidiservice">
        xmlns:tools="http://schemas.android.com/tools"
        package="com.android.bluetoothmidiservice"
        android:versionCode="1"
        android:versionName="R-initial"
        >
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />

    <uses-feature android:name="android.hardware.bluetooth_le"
         android:required="true"/>
@@ -9,7 +30,9 @@
         android:required="true"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>

    <application android:label="@string/app_name">
    <application
        tools:replace="android:label"
        android:label="@string/app_name">
        <service android:name=".BluetoothMidiService"
             android:permission="android.permission.BIND_MIDI_DEVICE_SERVICE"
             android:exported="true">
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.bluetoothmidiservice"
          android:versionCode="1"
          android:versionName="R-initial"
          >
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />
    <application
        android:label="BluetoothMidi"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true">
    </application>
</manifest>
+38 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

android_test {
    name: "BluetoothMidiTests",
    srcs: ["src/**/*.java"],
    certificate: "platform",
    static_libs: [
        //"frameworks-base-testutils",
        "android-support-test",
        "androidx.test.core",
        "androidx.test.ext.truth",
        "androidx.test.runner",
        "androidx.test.rules",
        "platform-test-annotations",
        "BluetoothMidiLib",
    ],
    test_suites: ["device-tests"],
    libs: [
        "framework-res",
        "android.test.runner",
        "android.test.base",
        "android.test.mock",
    ],
}
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          package="com.android.bluetoothmidiservice.tests.unit">
    <uses-sdk
        android:minSdkVersion="29"
        android:targetSdkVersion="29" />

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

    <instrumentation
        android:name="androidx.test.runner.AndroidJUnitRunner"
        android:targetPackage="com.android.bluetoothmidiservice.tests.unit"
        android:label="Bluetooth MIDI Service tests">
    </instrumentation>
</manifest>
Loading