Previously reading from an empty, closed Pipe returned: * IO exception if there were no writes to the pipe, * Empty byte array if there were writes to the pipe. With this change, we return an empty byte array on both paths. This also fixes a subtle race condition in the following flow: 1. Pipe is empty 2. Thread A is reading from the pipe (blocking call). 3. Thread B writes to the pipe and immediately closes it. 4. Thread A is unblocked and returns IO error. The data written by thread B is ignored! The new test in bluetooth_classic_test triggered that defect consistently. PiperOrigin-RevId: 518107700
Nearby
Nearby is a collection of projects focused on connectivity that enable building cross-device experiences.
This is not an officially supported Google product.
Projects
Nearby Connection
A peer-to-peer networking API that allows apps to easily discover, connect to, and exchange data with nearby devices in real-time, regardless of network connectivity.
Fast Pair
Utilizes Bluetooth Low Energy (BLE) to discover nearby Bluetooth devices without using significant phone battery, enabling "magical" scenarios based on device proximity.
Nearby Presence
An extension to Nearby Connections that features an extensible identity model for authentication and restricted visibility, resource management for system health, and proximity detection through sensor fusion.
Nearby for Embedded Systems
A lightweight implementation of Fast Pair intended for embedded systems.
Contributing
We encourage you to contribute to Nearby! Please check out the Contributing to Nearby guide for guidelines about how to proceed.
License
Nearby is released under the Apache License 2.0