CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. By using CancellationFlags, we can prevent the retries occuring during the Shutdown by short-circuiting an in flight AttemptToConnect, and checking for Cancellation before retries.
Because BluetoothClassic does not use futures, the short circuit only requires a check after ConnectToService, and returning an empty
socket.
PiperOrigin-RevId: 539755631
MediumEnvironment's initial state will now match the state after calling `Stop()`.
Cleaned up tests that were calling Stop() before test start.
PiperOrigin-RevId: 486277290
This CL should be a no-op.
Provide better access to the service ID during bandwidth upgrade handling. Notably, 1) have the endpoint channel store its associated service ID, and 2) send the service ID on a connect/disconnect.
The service ID identifies the application, for example, "NearbySharing". In future CLs, we will use the service IDs to better handle bandwidth-upgrade bookkeeping when multiple services are running simultaneously. Specifically, we will better handle reverting a bandwidth-upgrade medium without interfering with other services.
PiperOrigin-RevId: 442019209