Commit Graph
1083 Commits
Author SHA1 Message Date
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
hai007 5d207f9e15 Add the frequency of the connected AP into the ConnectionAttemptMetadata, the purpose is to judge if there is MCC symptom.
Storage increase will be 4 bytes increasing in ConnetionAttemptMetadata.

(4 bytes in each sharing * 2610000 shares/daily * 7 days/week) / GB = about 0.7 GB)
(2610000 was based on current daily connection attempts count on 20221017.)

PiperOrigin-RevId: 483115234
2022-10-22 21:51:58 -07:00
Fan Di 43d0ab83fb Fix copy/paste logging issue.
PiperOrigin-RevId: 482921344
2022-10-21 17:03:44 -07:00
hai007 e34cac3a96 Update connections_log.proto
1. 2499483 is the "Daily Initial Connection Attempts by Medium" from product data of 2022/10/10
2. http://shortn/_XocswsePbY

PiperOrigin-RevId: 482691333
2022-10-20 22:28:17 -07:00
hai007 5ad57c5841 Update connections_log.proto
1. 2499483 is the "Daily Initial Connection Attempts by Medium" from product data of 2022/10/10
2. http://shortn/_XocswsePbY

PiperOrigin-RevId: 482681421
2022-10-20 21:13:53 -07:00
Guogang Li d8f64233f5 Fixed the issue to handle file name in UTF8
PiperOrigin-RevId: 482535121
2022-10-20 10:47:04 -07:00
John Carroll 5cc1e369d2 Returns the correct object type for CreateInputFile and CreateOutputFile.
PiperOrigin-RevId: 482042035
2022-10-18 15:48:25 -07:00
hai007 cab9e31d0d Add Metrics for wifi-direct/direct-hotspot group crate failed
PiperOrigin-RevId: 481994099
2022-10-18 12:43:26 -07:00
hai007 1b140a4bd9 Fix internal target visibility.
PiperOrigin-RevId: 481799728
2022-10-17 19:35:57 -07:00
hai007 e39256100f Update connections_log.proto
1. 6526209 is the "Daily Transfers by Medium" from product data of 2022/10/10
2. http://shortn/_7cCKZxrmVH

PiperOrigin-RevId: 481789584
2022-10-17 18:26:16 -07:00
Hai Shang 4157b1f70b Add unit test for PayloadListner
PiperOrigin-RevId: 481773299
2022-10-17 16:53:52 -07:00
hai007 a620d8eeb6 Remove unused variable
Fixes -Wunused-variable warning

PiperOrigin-RevId: 481744648
2022-10-17 14:46:46 -07:00
hai007 0373f408b9 Update connections_log.proto
1. 6526209 is the "Daily Transfers by Medium" from product data of 2022/10/10
2. http://shortn/_7cCKZxrmVH

PiperOrigin-RevId: 481740338
2022-10-17 14:31:11 -07:00
Johnson Lu cf26a98379 Add gateway field in WifiDirectCredentials
PiperOrigin-RevId: 481066785
2022-10-13 23:15:51 -07:00
Janusz Sobczak 8128bbc062 Include LDT header
PiperOrigin-RevId: 480757134
2022-10-12 17:16:16 -07:00
Janusz Sobczak 4bd0337c10 Update to match revised BLE 4.2 specification
PiperOrigin-RevId: 479615854
2022-10-07 10:33:38 -07:00
Pu Shi ab80dbc2a3 [Nearby Connections] Extend timeout waiting for StopAllEndpoints to finish.
PiperOrigin-RevId: 479608809
2022-10-07 10:04:54 -07:00
John Carroll a3f5d108f5 Added a feature flag to control whether we are allowed to set the bluetooth adapter state or not on windows.
PiperOrigin-RevId: 479589889
2022-10-07 08:49:24 -07:00
hai007 d4392b4506 [Sharing][Copy&Paste] Combine uploadContacts and uploadCertificates to reduce server traffic.
PiperOrigin-RevId: 479466240
2022-10-06 18:52:28 -07:00
hai007 ff5f4d8ccc Use strongified advertiser inside block
Fixes unused-variable warning and a possible memory leak

PiperOrigin-RevId: 479430565
2022-10-06 15:43:30 -07:00
Hai Shang 57a8d8420c update presence client
PiperOrigin-RevId: 479424213
2022-10-06 15:17:26 -07:00
hai007 c82b0ba23e Add logging when a gRPC failed as the server UNAVAILABLE.
PiperOrigin-RevId: 479027905
2022-10-05 06:30:33 -07:00
hai007 8ef1a5f3a9 Fix Throughput Profiling Nightly Sanitizer Analysis test case error
PiperOrigin-RevId: 478878990
2022-10-04 14:08:31 -07:00
Hai Shang c4ad6de6f8 add scan function in presence BLE
PiperOrigin-RevId: 478666843
2022-10-03 19:35:23 -07:00
Guogang Li 2fff61b312 Separated BLE permission API into mediums manager
PiperOrigin-RevId: 478640491
2022-10-03 16:57:24 -07:00
Anthony Rueda 1443f3a135 Implement get public & private credentials.
PiperOrigin-RevId: 478522128
2022-10-03 09:18:19 -07:00
Eiden Kim 7350643c36 Update Prng usage so that it can generate random values on different threads.
PiperOrigin-RevId: 478025630
2022-09-30 10:31:27 -07:00
Hai Shang bf2d461cf6 Add unit tests for prng to verify it's not generating duplicating values
PiperOrigin-RevId: 478020355
2022-09-30 10:09:34 -07:00
John Carroll 646c3e5020 Move the increment rename tag (x) from before the first dot to before the last dot.
PiperOrigin-RevId: 477849732
2022-09-29 16:26:36 -07:00
hai007 8f681dece0 Throughput profiling
PiperOrigin-RevId: 477752265
2022-09-29 10:02:11 -07:00
Guogang Li a584dad4a9 Fixed the WiFi issue to handle service discovery
PiperOrigin-RevId: 477613253
2022-09-28 19:42:48 -07:00
hai007 ad93e1f47b Retry the Hotspot IP address query procedure
PiperOrigin-RevId: 477592843
2022-09-28 17:26:17 -07:00
hai007 f65e32ad32 Catch exceptions when retrieve Hotspot IP address
PiperOrigin-RevId: 477363744
2022-09-27 23:11:03 -07:00