summaryrefslogtreecommitdiffstats
path: root/core/jni/android_hardware_UsbDevice.cpp
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-01-25 21:13:11 -0800
committerErik Gilling <konkers@android.com>2011-01-25 21:13:11 -0800
commit215532c579064d44e529acdc69d41455c2bb9ad5 (patch)
treec136115830d902baf6914cc986a441119653ce0d /core/jni/android_hardware_UsbDevice.cpp
parent53fd3bc82f6341a3994bf8b57f8784b6e1b75100 (diff)
downloadframeworks_base-215532c579064d44e529acdc69d41455c2bb9ad5.zip
frameworks_base-215532c579064d44e529acdc69d41455c2bb9ad5.tar.gz
frameworks_base-215532c579064d44e529acdc69d41455c2bb9ad5.tar.bz2
usb: correct return type of android_hardware_UsbDevice_claim_interface
Change-Id: I1e8bfb8d52b5bb87e5bb7249ab439740f57e63f3
Diffstat (limited to 'core/jni/android_hardware_UsbDevice.cpp')
-rw-r--r--core/jni/android_hardware_UsbDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_hardware_UsbDevice.cpp b/core/jni/android_hardware_UsbDevice.cpp
index 22cf387..4bc9154 100644
--- a/core/jni/android_hardware_UsbDevice.cpp
+++ b/core/jni/android_hardware_UsbDevice.cpp
@@ -86,7 +86,7 @@ android_hardware_UsbDevice_get_fd(JNIEnv *env, jobject thiz)
return usb_device_get_fd(device);
}
-static jint
+static jboolean
android_hardware_UsbDevice_claim_interface(JNIEnv *env, jobject thiz, int interfaceID, jboolean force)
{
struct usb_device* device = get_device_from_object(env, thiz);
@@ -101,7 +101,7 @@ android_hardware_UsbDevice_claim_interface(JNIEnv *env, jobject thiz, int interf
usb_device_connect_kernel_driver(device, interfaceID, false);
ret = usb_device_claim_interface(device, interfaceID);
}
- return ret;
+ return ret == 0;
}
static jint