Add support for an L2CAP server network
This change creates an AcceptThread inside ReservedServerOffer which
accepts all incoming L2CAP connections and creates an L2capNetwork for
each of them.
Note that these networks are indistinguishable, so CS will tear all but
the first one down. This is working as intended.
If the L2capNetwork or the AcceptThread encounter any error during
execution, the reserved offer is torn down and the reserving app will
receive an onUnavailable() callback (by virtue of reservation
semantics).
Test: atest NetworkReservationTest
Change-Id: I49d078fb32ff48c1201a8a4dc65cbe785dcc9179
2 files changed