Fix a lint issue with UsbMidiDeviceAndroid.java.

Currently, the lint warns at:
Error: Call requires API level 18 (current min is 14):
    android.hardware.usb.UsbDeviceConnection#bulkTransfer [NewApi]

So we need to add @TargetApi to suppress this lint error.

BUG=327768

Review URL: https://codereview.chromium.org/276943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269528 0039d316-1c4b-4281-b951-d872f2087c98
parent ee7173b3
......@@ -4,6 +4,7 @@
package org.chromium.media;
import android.annotation.TargetApi;
import android.hardware.usb.UsbConstants;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
......@@ -11,6 +12,7 @@ import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbInterface;
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbRequest;
import android.os.Build;
import android.os.Handler;
import android.util.SparseArray;
......@@ -186,6 +188,7 @@ class UsbMidiDeviceAndroid {
* @param endpointNumber The endpoint number of the destination endpoint.
* @param bs The data to be sent.
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@CalledByNative
void send(int endpointNumber, byte[] bs) {
if (mIsClosed) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment