This patch adds functionality to unify java and native sockets. This is
part one of two of a change to allow functionality for testing full
coverage of all APIs.
Bug: 76152303
Test: Ran tests on Walleye
Change-Id: I9bd57d6267f82d8c1ac293a0147dc2c115dd4181