Commit Graph
17 Commits
Author SHA1 Message Date
Francis Tsui ae015665cd Set file last modified time.
PiperOrigin-RevId: 791926107
2025-08-06 18:25:42 -07:00
Edwin Wu 334ef7a3e1 [JNI] Refactor Payload and PayloadId/PayloadType
PiperOrigin-RevId: 640490438
2024-06-05 05:25:29 -07:00
Anay Wadhera 5d6735371b Make sure we never generate a payload ID of 0.
PiperOrigin-RevId: 632210716
2024-05-09 11:15:02 -07:00
Janusz Sobczak 2c55c0cdbd Refactor Pipe implementation
* Remove Pipe classes
* Rename BasePipe to Pipe
* Hide Pipe class in anonymous namespace in pipe.cc
* Add CreatePipe static method
* Replace Payload(std::function<InputStream&()>) with Payload(std::unique_ptr<InputStream>)
* Find&Replace Pipe usages

PiperOrigin-RevId: 557276980
2023-08-15 15:53:58 -07:00
hai007 9a22f71a54 Remove PayLoad::AsBytes()&& to fix -Wreturn-stack-address error
With never versions of libc++, Chromium builds would fail with:

  ../../third_party/nearby/src/connections/payload.cc:105:50:
  error: returning reference to local temporary object [-Werror,-Wreturn-stack-address]
      return result ? std::move(*result) : std::move(ByteArray());
                                                     ^~~~~~~~~~~

Before this libc++ version, the error was masked by the std::move.

If I understand correctly, the only user of this function was
BytesInternalPayload::DetachNextChunk() which was going to make a copy of the
ByteArray annyways, so it might as well use the AsBytes() overload that returns
a const ref.

See also https://crbug.com/1407615#c2

PiperOrigin-RevId: 502946204
2023-01-18 12:21:22 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
jfcarroll bd9d01ec29 Fix for outgoing file names being truncated, and renaming input files should not occur, only output files.
PiperOrigin-RevId: 457857046
2022-06-28 17:41:29 -07:00
jfcarroll b5a1359d1f Automated g4 rollback of changelist 451248048.
*** Reason for rollback ***

Although this fixes Bluetooth Classic, it appears to break Ble, will resubmit once Ble is fixed.

*** Original change description ***

BEGIN_PUBLIC
Bug fixes for 233012255 and 232995024
Refactor bluetooth_adapter setname and getname to remove logic errors, array overruns, and leaking memory.
Refactor bluetooth discovery callbacks to prevent getting updates before we have cached the device found.
Refactor the dart code interfaces to more closely align between the dll and the dart UI, and move from using the device name (which can be easily duplicated) as the primary key to using endpoint_id as the primary key for all calls into...

***

PiperOrigin-RevId: 452177878
2022-05-31 17:31:03 -07:00
jfcarroll 8765e5bc83 Bug fixes for 233012255 and 232995024
Refactor bluetooth_adapter setname and getname to remove logic errors, array overruns, and leaking memory.
Refactor bluetooth discovery callbacks to prevent getting updates before we have cached the device found.
Refactor the dart code interfaces to more closely align between the dll and the dart UI, and move from using the device name (which can be easily duplicated) as the primary key to using endpoint_id as the primary key for all calls into the dll.

PiperOrigin-RevId: 451248048
2022-05-26 14:46:08 -07:00
jfcarroll d0a83cee39 This correctly exports the dll functions needed by the flutter app (and any other app).
PiperOrigin-RevId: 449402726
2022-05-17 23:21:55 -07:00
jfcarroll 4c13db0c2d This is a fix for incoming payloads not having a file_name set.
PiperOrigin-RevId: 440438936
2022-04-08 13:25:42 -07:00
jfcarroll f4b80ccb59 These are the changes for Payload::Type => PayloadType for the flattening CL
PiperOrigin-RevId: 436767666
2022-03-23 10:11:15 -07:00
jfcarroll 6d24d42132 Fix a bug where output files aren't being downloaded.
PiperOrigin-RevId: 435672340
2022-03-18 10:24:20 -07:00
jfcarroll 517d77f5aa This adds parent path and file name to the Payload constructor. This will affect chrome.
PiperOrigin-RevId: 435223740
2022-03-16 19:18:13 -07:00
suetfei ae0337db3b Internal refactor to fix bug.
PiperOrigin-RevId: 427513885
2022-02-09 10:49:31 -08:00
suetfei efdd4c0f6a Internal refactor to replace unsupported dependencies.
PiperOrigin-RevId: 427474223
2022-02-09 08:10:08 -08:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00