Commit Graph
23 Commits
Author SHA1 Message Date
Francis Tsui d69bd78d13 Fix deadlock during log rotations.
PiperOrigin-RevId: 622916139
2024-04-08 12:10:26 -07:00
hai007 cf2a1eb0b1 Internal change
PiperOrigin-RevId: 613133183
2024-03-06 10:21:45 -08:00
Copybara-Service ee404cb766 Merge pull request #2307 from ChenWangG:patch-1
PiperOrigin-RevId: 612604370
2024-03-04 15:42:43 -08:00
Francis Tsui d15f533721 Cleanup BUILD dependencies.
PiperOrigin-RevId: 609511614
2024-02-22 15:05:13 -08:00
Francis Tsui 97a3ceb311 - Remove unused data manager classes.
PiperOrigin-RevId: 596628112
2024-01-08 10:08:39 -08:00
Francis Tsui 94ae577069 - Cleanup BUILD deps
PiperOrigin-RevId: 592976313
2023-12-21 16:45:49 -08:00
Francis Tsui aea7a09a24 Switch DeviceInfo to use UTF-8 strings.
- Move conversion from native to UTF-8 into platform impl.

PiperOrigin-RevId: 592912664
2023-12-21 11:35:20 -08:00
Francis Tsui 32740f8591 Move FakeAccountManager to nearby/internal/test
PiperOrigin-RevId: 592055356
2023-12-18 17:30:16 -08:00
Janusz Sobczak 8846f8b57e Migrate to AnyInvocable in data/
PiperOrigin-RevId: 566721712
2023-09-19 13:13:30 -07:00
Janusz Sobczak b33c0e0332 Migrate to AnyInvocable in auth module
Merged success/failure callbacks into a single callback
in SignInCallback and AccessTokenCallback to simplify resource management and to avoid making copies.

PiperOrigin-RevId: 565744310
2023-09-15 12:11:50 -07:00
Guogang Li fabeff0d57 Added APIs to control device sleep
These APIs can be used to prevent device into sleep when sending supper big files.

PiperOrigin-RevId: 556809236
2023-08-14 09:05:11 -07:00
Guogang Li c6566b00c7 internal update
PiperOrigin-RevId: 549351164
2023-07-19 10:15:19 -07:00
Guogang Li a72be2bc8c internal update
PiperOrigin-RevId: 547982511
2023-07-13 18:21:18 -07:00
Guogang Li 85a01e9636 internal refactor
PiperOrigin-RevId: 547586065
2023-07-12 13:31:57 -07:00
Qin Wang a8b6fdee59 Implement fake GetResponse and migrate fake_http_client to third_party/nearby/internal/test
PiperOrigin-RevId: 544518775
2023-06-29 18:39:50 -07:00
Qin Wang 22c3a07677 Migrate DataManager to third_party/nearby/internal
PiperOrigin-RevId: 544395891
2023-06-29 10:31:07 -07:00
Juliet Levesque 240159e872 [Nearby Connections] Stop 3 AttemptsToConnect over WebRTC for CancellationFlag
CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. WebRTC using 3 x 10s retries to connect, which means we are potentially waiting for 30 seconds of retries to execute during shutdown (which is longer than the 10s duration alloted for Core shutdown).

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.

PiperOrigin-RevId: 539690403
2023-06-12 10:16:36 -07:00
Juliet Levesque 8a78212bb8 [Nearby Connections] Check for shutdown before accessing ClientProxy.
During the destruction of NearbyConnections, Core (which owns ClientProxy) is destructed before ServiceController (which owns EndpointManager), which means any pending tasks on the EndpointManager executor that use ClientProxy will be using
garbage memory. To fix this issue, EndpointManager::DiscardEndpoint will check
for an `is_shutdown` boolean set during ~EndpointManager before accessing
ClientProxy. The assumption is that any accessing of ClientProxy after the
destruction will be invalid.

PiperOrigin-RevId: 532581122
2023-05-16 14:54:20 -07:00
Nick Bourdakos ebab912fb6 Fix heap-use-after-free issue in fake timer
PiperOrigin-RevId: 530644090
2023-05-09 10:15:09 -07:00
Guogang Li 15d81201f8 Fixed data race in FakeTaskRunner
PiperOrigin-RevId: 528627577
2023-05-01 18:06:35 -07:00
Guogang Li 46e4b3eca7 Fixed a data race bug in test codes
PiperOrigin-RevId: 528074883
2023-04-28 22:25:09 -07:00
Qin Wang 698ca77f2a Mutex guard FakeClock
PiperOrigin-RevId: 527382176
2023-04-26 14:52:46 -07:00
Qin Wang 86ca85b85a Migrate fake functions to third_party/nearby to help unit test
PiperOrigin-RevId: 517433481
2023-03-17 09:34:58 -07:00