Bring up L2capNetwork for client network request

This change brings up an L2capNetwork when there is a client network
request and the BluetoothSocket connects successfully.

Any error on that network will mark all associated NetworkRequests as
unfulfillable triggering an onUnavailable() callback on them. This may
or may not be expected, because the network might have come up before
the onUnavailable() is sent.

Fixing this should go hand-in-hand with instituting some sort of retry
logic. Without retries, if these callbacks were to just tear down the
network (triggering onLost()), an app might not be able to trigger a
retry using the same PSM and remote MAC parameters, because a second
request for the same parameters might exist (so the request is never
fully removed). This means, that without any sort of retry logic,
tearing down all active requests for this network is the best option.

Test: TH
Change-Id: I70196aa4505aa0a8cbf815764de8d977c1bc70cc
1 file changed