diff options
author | Philip P. Moltmann <moltmann@google.com> | 2016-08-29 12:28:31 -0700 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2016-08-30 10:52:39 -0700 |
commit | 674e8c3825032833e5169439a97356e2ad450712 (patch) | |
tree | 91972b81147c1f0b4db8dc79505f234475b9d3f8 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 79758c8e7706f3cce265a881cc66df8771d3c456 (diff) |
Do not leak usb device connection FD
The native code uses mNativeContext=0 to indicate that is was already
closed and checks this properly. Hence let's leave the checking in the
native code.
We need to keep a reference in UsbRequest as otherwise the
UsbDeviceConnection might get finalized while a UsbRequest is in
progress. The UsbRequest itself makes sure that it is not garbage
collected while the I/O is in progress.
Also I added CloseGuards to make sure the classes are used properly and
fixed an error string in the native code.
Fixes: 31124312
Bug: 31021315
Change-Id: I96deb73957eba0e14e6b656988a2ae9b409bf55f
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions