Only allow one pending bluetooth request at a time
Currently there may be multiple identical bluetooth requests waiting for
the PAN service to connect before their listeners are notified. To
simplify future code, we should only allow one pending request/listener
pair at a time, and reject every subsequent request with
TETHER_ERROR_SERVICE_UNAVAILABLE.
This should be OK because
1) Bluetooth tethering is hardly used at all
2) Settings disallows extra startTethering calls between the first call
and the bluetooth service starting
3) Apps are expected to handle TETHER_ERROR_SERVICE_UNAVAILABLE
correctly.
Bug: 216524590
Test: atest TetheringTest
Change-Id: I8375d495575715f428e893316f7cd7e5a7ebba59
2 files changed