commit | 42bd8e1ec05dd11a7838ff37345ff1d6be77641b | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Wed Oct 31 12:26:40 2018 -0700 |
committer | Josh Gao <jmgao@google.com> | Fri Nov 09 14:10:40 2018 -0800 |
tree | e12772f4b5447f9f6517967634645b586a857a85 | |
parent | 401fb2485aac4ecf44921706a3476f0fcaedc035 [diff] |
Avoid calling ParcelFileDescriptor.fromSocket on new Sockets. Previously, we were calling ParcelFileDescriptor.fromSocket on a newly initialized Socket, which doesn't actually create a file descriptor until the Socket is bound or connected. Bind the Socket to a random port to force the file descriptor to be allocated. Test: treehugger Change-Id: Id92a3e1316881d1c5382485aa2d6a41fc37e9651