If the platform (e.g., ChromeOS) doesn't provide an EventLogger, this WARNING is logged for nearly every Nearby Connections method.
PiperOrigin-RevId: 442539723
Rename RevertInitiatedBwuMediumForEndpointIfNecessary to RevertBwuMediumForEndpoint because this method can be called by RESPONDERs of the bandwidth upgrade request. Also, make sure to remove the endpoint from the endpoint-to-medium map.
PiperOrigin-RevId: 442055611
Add unit tests for BaseBwuHandler and BwuManager (BWU initiation only). Add fake classes and helper methods needed for testing. Refine comments and logs.
PiperOrigin-RevId: 442021842
* Fix bandwidth upgrade service ID usage. For instance, no longer use the inaccurate service ID from ClientProxy.
* Add more fine-grained upgraded endpoint tracking using both service IDs and endpoint IDs
* Only "revert" bandwidth-upgrade mediums--for example, stop accepting connections on a server socket--for a service when the last endpoint for that service is finished.
These changes are necessary to support multiple services (e.g., Nearby Share and Phone Hub) and multiple mediums (e.g., WebRTC and WLAN).
PiperOrigin-RevId: 442021257
Consolidate BWU service ID bookkeeping into the BaseBwuHandler class. This eliminates duplicated code in per-medium BWU handlers and allows us to easily augment the bookkeeping with endpoint IDs in a subsequent CL.
Also, localize all service ID wrapping to the BaseBwuHandler class. A postfix is appended to the service ID during bandwidth upgrade, e.g., "NearbyShare_INITIATOR_BWU"; this is done to distinguish a medium's use for advertising/discovery vs. its use for device-to-device connections.
This CL should theoretically be a no-op, but per-medium BWU handlers were inconsistent in their implementations.
PiperOrigin-RevId: 442019603
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
[iOS] Fixes the file_path is empty when "CreateIncomingInternalPayload" in internal_payload_factory. If empty then use the payload_id for the file_name.
END_PUBLIC
- This is for the way iOS -> Android file transfer.
- CC_MD5 is deprecated in iOS13, change to CC_SHA256
- UIImageWriteToSavedPhotosAlbum, the UIImage* is nil after completion callback to the selector "didFinishSavingWithError". Changes to show image by "showReceivedImage" after write to Photo album.
- "NSDownloadsDirectory" seems have
<<Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Downloads” in the folder>>. Changes to use "NSTempDirectory".
PiperOrigin-RevId: 440808267