diff options
author | Elliott Hughes <enh@google.com> | 2011-04-11 16:50:19 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-04-11 17:04:01 -0700 |
commit | a3804cf77f0edd93f6247a055cdafb856b117eec (patch) | |
tree | 795814e56ceddf3773f7f2b47bb7a6b632daa5d5 /core/jni/android_hardware_UsbDeviceConnection.cpp | |
parent | 4123211637dcc0155091016f0c0987b80e56ab7b (diff) | |
download | frameworks_base-a3804cf77f0edd93f6247a055cdafb856b117eec.zip frameworks_base-a3804cf77f0edd93f6247a055cdafb856b117eec.tar.gz frameworks_base-a3804cf77f0edd93f6247a055cdafb856b117eec.tar.bz2 |
You don't need to poke around inside FileDescriptor manually.
We can help you with that.
Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.
Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
Diffstat (limited to 'core/jni/android_hardware_UsbDeviceConnection.cpp')
-rw-r--r-- | core/jni/android_hardware_UsbDeviceConnection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_hardware_UsbDeviceConnection.cpp b/core/jni/android_hardware_UsbDeviceConnection.cpp index e259514..4d73bf3 100644 --- a/core/jni/android_hardware_UsbDeviceConnection.cpp +++ b/core/jni/android_hardware_UsbDeviceConnection.cpp @@ -42,7 +42,7 @@ static jboolean android_hardware_UsbDeviceConnection_open(JNIEnv *env, jobject thiz, jstring deviceName, jobject fileDescriptor) { - int fd = getParcelFileDescriptorFD(env, fileDescriptor); + int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); // duplicate the file descriptor, since ParcelFileDescriptor will eventually close its copy fd = dup(fd); if (fd < 0) |