Commit Graph
1265 Commits
Author SHA1 Message Date
Guogang Li 8c8e5d7e6f Updated the read method for Bluetooth classic
PiperOrigin-RevId: 487595432
2022-11-10 11:37:22 -08:00
hai007 dba1deab3c Check if the stored WIFI network is exist before restore WIFI connection
PiperOrigin-RevId: 487585021
2022-11-10 10:59:13 -08:00
Guogang Li 23a27d9384 Catch all socket exceptions
PiperOrigin-RevId: 487316606
2022-11-09 12:29:43 -08:00
hai007 3d91433f3a Add AttachmentSourceType
PiperOrigin-RevId: 487258425
2022-11-09 08:58:12 -08:00
Guogang Li c9429fcb46 Fixed the bug of Laptop unable to detect another Laptop after first attempt
PiperOrigin-RevId: 487130249
2022-11-08 21:08:43 -08:00
hai007 219f9b75e1 Restore the WIFI connection when connecting to Hotspot fails.
PiperOrigin-RevId: 486809154
2022-11-07 17:44:06 -08:00
Guogang Li 59d172fe64 Recovered the codes of BLE medium
PiperOrigin-RevId: 486803584
2022-11-07 17:11:17 -08:00
Nick Bourdakos 4fb6ba318c Internal change
PiperOrigin-RevId: 486691317
2022-11-07 09:59:14 -08:00
Janusz Sobczak a90b7f85fc Disable medium env by default.
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
2022-11-04 18:56:30 -07:00
Janusz Sobczak 5faa395f24 Change enum PublicCredentialType to enum class.
PiperOrigin-RevId: 486243753
2022-11-04 15:26:34 -07:00
Anay Wadhera f0440e96a9 Revert "Allow tink to be fetched and compile presence in bazel builds."
PiperOrigin-RevId: 486238870
2022-11-04 15:03:56 -07:00
Janusz Sobczak 23c9b106b1 Remove dependency on tink.
PiperOrigin-RevId: 486232030
2022-11-04 14:32:56 -07:00
Janusz Sobczak 951945dd5c Add AdvertisementData struct.
Define and use an NP private AdvertisementData structure instead of the low level BleAdvertisementData,
The APIs look cleaner this way.

PiperOrigin-RevId: 486224840
2022-11-04 14:03:24 -07:00
Hai Shang de4e7a66dc Utilize ScanManager for scan operation in service controller.
PiperOrigin-RevId: 486208283
2022-11-04 12:50:19 -07:00
Copybara-Service 79ca955c6f Merge pull request #1013 from sourajitk:master
PiperOrigin-RevId: 486166518
2022-11-04 10:02:01 -07:00
Copybara-Service 0958553a66 Merge pull request #1017 from bourdakos1:bourdakos1-patch-1
PiperOrigin-RevId: 486037435
2022-11-03 19:58:02 -07:00
Anay Wadhera bc21803bee Include internal/platform/logging.h to pick the correct logging library
PiperOrigin-RevId: 486016407
2022-11-03 17:34:41 -07:00
Anay Wadhera c0531d556c Explicitly convert absl::string_view to std::string for chromium
PiperOrigin-RevId: 485990008
2022-11-03 15:34:38 -07:00
Sourajit Karmakar 124ceb9f64 Remove the iOS sample app link since it no longer exists.
Change-Id: Ie237c17a4165f75d3b5a5ddfc8772cd8cd6de087
2022-11-03 18:21:14 -04:00
Nick Bourdakos f385ab8349 Update README.md 2022-11-03 18:09:29 -04:00
Anay Wadhera 8028821593 Switch to .pb.h and explicit conversions to std::string
PiperOrigin-RevId: 485942813
2022-11-03 12:31:18 -07:00
Anay Wadhera 373a694b32 Add missing die_if_null and flat_hash_map dependency to fix build error
PiperOrigin-RevId: 485938749
2022-11-03 12:14:16 -07:00
Anay Wadhera 4c2ba2e2b7 Add missing #include <array> to uuid.h to fix build error
PiperOrigin-RevId: 485932488
2022-11-03 11:51:06 -07:00
Anay Wadhera 2b3b810363 Remove visibility for non-existent dir
PiperOrigin-RevId: 485927350
2022-11-03 11:32:37 -07:00
Janusz Sobczak d268b077c9 Save scan callbacks before starting scan session.
This reduces flakiness. We can start receiving advertisements before StartScan() has finished.

PiperOrigin-RevId: 485904791
2022-11-03 10:13:02 -07:00
Anay Wadhera 74f7f5ec5c Fix visibility rules
PiperOrigin-RevId: 485897261
2022-11-03 09:44:47 -07:00
John Carroll 180b76cf84 Split file path processing off into it's own static class and implement validation.
PiperOrigin-RevId: 485890871
2022-11-03 09:18:34 -07:00
Anay Wadhera fa983e304a Allow tink to be fetched and compile presence in bazel builds.
PiperOrigin-RevId: 485876571
2022-11-03 08:15:15 -07:00
Hai Shang b056e6561a Add manager_app_id to scan and broadcast requests
PiperOrigin-RevId: 485745403
2022-11-02 18:14:27 -07:00
Anay Wadhera c4dc132f50 Add ScanManager class for bookkeeping BLE v2 scans
PiperOrigin-RevId: 485675999
2022-11-02 13:15:31 -07:00
hai007 4935a2ffdb Remove usage of deprecated WebRTC APIs
PiperOrigin-RevId: 485657180
2022-11-02 12:01:42 -07:00
Guogang Li 33c5f44ea1 Unified the exception handling in socket
PiperOrigin-RevId: 485457718
2022-11-01 17:15:51 -07:00
hai007 03b1c773fe WIFI Direct implementation (2)
Part 2: Implementation g3 medium/Environment/platform layer unit test

PiperOrigin-RevId: 485417100
2022-11-01 14:23:14 -07:00
hai007 5385dd4d6b Fix data race problem
PiperOrigin-RevId: 485414615
2022-11-01 14:13:24 -07:00
hai007 3d812bbf1c Add Timer implementation to Fast Pair Windows
PiperOrigin-RevId: 485215393
2022-10-31 20:28:53 -07:00
hai007 fc5033df11 [Sharing Analytics] add TAP log for quick setting file share button click.
PiperOrigin-RevId: 485197485
2022-10-31 18:33:18 -07:00
Hai Shang 5d12e6ffa0 Adding default value to fix the msan issue in the types test
PiperOrigin-RevId: 485083607
2022-10-31 10:16:32 -07:00
Suet-Fei Li b6b692b0ea WIFI Direct implementation (1)
Part 1: Implement internal common code
Add implementation/g3 skeleton code for testing coverage.

PiperOrigin-RevId: 485067018
2022-10-31 09:14:09 -07:00
Janusz Sobczak 81f6b547bb Add StartAdvertising to BLE medium.
StartAdvertising allows us to broadcast Nearby Presence advertisements.
We can now test scanning and advertising with the MediumEnvironment rather than mocking platform code.

PiperOrigin-RevId: 484662211
2022-10-28 18:23:30 -07:00
Janusz Sobczak 5d742558a4 Add advertisement filtering
PiperOrigin-RevId: 484616133
2022-10-28 14:07:29 -07:00
Janusz Sobczak bc9a6ec55b Use LDT for advertisement decryption.
We are still missing the real LDT implementation, so the code is linked with a
placeholder code that doesn't do the actual encryption.

PiperOrigin-RevId: 484596294
2022-10-28 12:37:48 -07:00
hai007 dfdc3dd818 Include <crtdbg.h> in scheduled_executor.cc.
The source in `scheduled_executor.cc` refers to the macro, `_ASSERT`. This macro is defined in `crtdbg.h`.

PiperOrigin-RevId: 484319035
2022-10-27 12:21:34 -07:00
hai007 2eec1cba0e [Sharing Analytics] create and log the use case for sharing file from quick setting.
PiperOrigin-RevId: 484245564
2022-10-27 07:23:52 -07:00
hai007 13704a7a2a Add AppCrash to SharingLog
PiperOrigin-RevId: 484165755
2022-10-26 23:32:18 -07:00
Hai Shang 04b888ace4 Add default callbacks in broadcast & scan operations
PiperOrigin-RevId: 484029311
2022-10-26 11:45:28 -07:00
hai007 2206f21c3f Enable TAP test for nearby.fastpair.windows
Enable some packages to visible to nearby fast pair

PiperOrigin-RevId: 483819412
2022-10-25 17:31:00 -07:00
Janusz Sobczak 53c504be9d Use LDT for advertisement encryption.
We are still missing the real LDT implementation, so the code is linked with a
placeholder code that doesn't do the actual encryption.

We also needed to pass the `account_name` to credential manager to choose the
correct credentials.

PiperOrigin-RevId: 483801163
2022-10-25 16:09:17 -07:00
hai007 41ba8c8a14 Convert #include <xstring> to #include <string> in nearby files.
`<xstring>` is the MSVC internal implementation file for string. This makes it contingent on the MSVC STL.

`<string>` provides the same declarations, but does not expose the MSVC-specific implementation details. This implementation is guaranteed to meet the C++ standard exactly.

This change updates includes of `<xstring>` to be includes of `<string>`.

PiperOrigin-RevId: 483696244
2022-10-25 09:30:40 -07:00
hai007 32e6fc3c42 Previously, we log incoming remote endpoint upgrade failure and local upgrade setup failure incorrectly as CHANNEL_ERROR. In this CL, they are logged as REMOTE_CONNECTION_ERROR and xxx_MEDIUM_ERROR instead.
Note that the user can always filter out these errors if necessary. Update isAbnormalUpgradeFailure() check as part of upgrade failure reason code change.

In addition, skip incoming/outgoing upgrade logging only if the upgrade fails and initial connection is already removed.

PiperOrigin-RevId: 483545395
2022-10-24 19:07:30 -07:00
Hai Shang 054f6efe53 Chain scan & broadcast invokes from PresenceClient to ServiceController
PiperOrigin-RevId: 483496670
2022-10-24 15:12:43 -07:00