Commit Graph
517 Commits
Author SHA1 Message Date
jfcarroll 6269b8b60a Changes to the Windows solution/projects for fixes for ConditionVariable, Mutex, ServerSocket, and started exporting symbols for the UI.
PiperOrigin-RevId: 400983103
2021-10-05 07:48:21 -07:00
hai007 55edd5efa6 Branch BandwidthUpgradeManagerV2 to support the re-priority mechanism, separate the priority logic into BandwidthUpgradeProtocol to support below priority
1. 6GHz > 5GHz > 2.4 GHz

2. 80 MHz > 40 MHz > 20 MHz medium for 5GHz mediums(next CL)

PiperOrigin-RevId: 400929119
2021-10-05 02:29:31 -07:00
edwinwu 38f89e4e05 analytics: 3p NC: Update Connections_log.proto
PiperOrigin-RevId: 400862464
2021-10-04 18:21:32 -07:00
guogang 4af1c80eee Fixed a few issues in WiFi LAN feature.
PiperOrigin-RevId: 400786291
2021-10-04 12:27:45 -07:00
guogang 4c72e4667e Fixed the issue to initialize an EndpointInfo instance in payload manager.
PiperOrigin-RevId: 400624671
2021-10-03 20:59:29 -07:00
nohle 0d803da06e Replace proto.h includes with pb.h
PiperOrigin-RevId: 399801411
2021-09-29 16:20:05 -07:00
nohle bc8769c64e [Nearby Connections][C++] Wake up keep-alive thread to unblock destruction
PiperOrigin-RevId: 399693890
2021-09-29 08:39:37 -07:00
guogang 1f0ec837b6 Add WiFi LAN medium on Windows
PiperOrigin-RevId: 399587411
2021-09-28 19:47:40 -07:00
edwinwu deb5776362 nearbyconnections : Refactor WifiLan.
PiperOrigin-RevId: 399570712
2021-09-28 17:54:51 -07:00
hais e52b7e1edd Add more time buffer so that the alarm will be executed as expected in tests. It will fix the flaky EndpointIdRotateWhenHighVizAdvertisementAgainForAWhile test.
PiperOrigin-RevId: 399248463
2021-09-27 12:08:47 -07:00
fdi 7e99f545e3 [Sharing][Analytics] Create a new failure type to indicate unknown response from remote side.
Since these are not payloads failures, the connection is canceled by local device. FAILED_ATTACHMENT_TRANSMISSION_STATUS is reserved for payload failures.

PiperOrigin-RevId: 398821851
2021-09-24 15:04:16 -07:00
fdi 6fc709d6c8 [Analytics] Add proto and enum for establish_connection event.
Set up the proto and enums in advance. No real logic.

LOG_STORAGE_INCREASE(GB/week): 0.5
Based on go/ns-analytics-worksheet

PiperOrigin-RevId: 398810446
2021-09-24 14:08:11 -07:00
xlythe 69307c4604 Add error codes for mediums being disabled on unsupported devices
PiperOrigin-RevId: 398801753
2021-09-24 13:26:41 -07:00
jfcarroll 27577c6994 Delete the windows specific count_down_latch and use the shared implementation
PiperOrigin-RevId: 398772515
2021-09-24 11:17:45 -07:00
hai007 d68a8f6216 Add following information into metrics:
1. country code: where the device is located.
2. network operator: the telephony operator MCC/MNC value.
3. tdls status: the TDLS status of the WiFi Lan
4. AP frequency: the wifi frequency of the connected WiFi AP.
5. Tethering status: the enable status of the wifi Hotspot.
6. try counts: the try counds of the medium operation.
7. Tx/Rx speed: the MAX TX/RX speed of the WiFi network.
8. Channel width: the supported WiFi frequency MHz value. e.g. 20MHz or 40MHz for the WiFi Direct Client or WiFi Hotspot STA.

Storage increase will be:
1.4 bytes connected_ap_frequency in advertising side
2.4 bytes connected_ap_frequency + 1 byte supports_extended_ble_advertisements in discover side.
3. Incoming or outgoing conection:
    4 bytes wifi_channel_width
    So need 4*4 = 16 bytes in two directions initial connections and two directions bandwidth upgrades.

So there are total 4+5+16 =  25 bytes grows in each share.

(25 bytes in each sharing * 1072782 shares/daily * 7 days/week) / GB = about 0.175 GB)
(1072782 was based on current daily activedevice on 20210906.)

PiperOrigin-RevId: 398656656
2021-09-23 23:02:45 -07:00
jfcarroll d16de1c3ab Fixed a bug in BluetoothAdapter::SetName, that was causing the loss of the default name.
PiperOrigin-RevId: 397871581
2021-09-20 16:43:33 -07:00
jfcarroll 687d1ba4b5 Clean up platform.cc Remove unnecessary namespace symbols to improve consistency.
PiperOrigin-RevId: 397870990
2021-09-20 16:40:42 -07:00
jfcarroll 584e1c0ac7 Cleanup unit tests, and remove the loop that checks to make sure all jobs are run.
PiperOrigin-RevId: 397869801
2021-09-20 16:35:15 -07:00
hai007 c56f7a29ba Internal change.
PiperOrigin-RevId: 397581907
2021-09-19 01:53:57 -07:00
jfcarroll 233c5f5337 Refactor thread pool to support lazy initialization.
PiperOrigin-RevId: 397152910
2021-09-16 13:19:03 -07:00
jfcarroll c6ebc3162f Fix for failing executor test.
PiperOrigin-RevId: 396998512
2021-09-15 22:08:08 -07:00
jfcarroll 0de9bed4ca Initial commit for bluetooth classic medium notified of adapter scan mode change.
PiperOrigin-RevId: 396955416
2021-09-15 16:55:07 -07:00
jfcarroll 1a3b294407 Finish off SystemClock
PiperOrigin-RevId: 396369189
2021-09-13 09:07:16 -07:00
edwinwu e4a3da97d1 analytics: 3p NC: Implement AnalyticsRecorder::OnErrorCode
PiperOrigin-RevId: 396041619
2021-09-10 17:42:34 -07:00
jfcarroll 2de4bfeda9 Initial implementation of ScheduledExecutor
PiperOrigin-RevId: 396036314
2021-09-10 17:02:15 -07:00
edwinwu 6926f5cd4b analytics: 3p NC: Implement ErrorCodeRecorder for AnalyticsRecorder.
PiperOrigin-RevId: 395881244
2021-09-10 02:04:06 -07:00
hai007 7e4f65b882 BEGIN_PUBLIC
[Sharing][Analytics] Add set_device_name_dialog and set_data_usage_dialog to launch activity event.
END_PUBLIC

09-08 11:24:29.372 24761 24761 I NearbySharing: NearbySharingLog:ActivityName: device_name_dialog, TimestampMillis:3072 [CONTEXT service_id=194 ]
09-08 11:24:36.160 24761 24761 I NearbySharing: NearbySharingLog:ActivityName: data_usage_dialog, TimestampMillis:3250 [CONTEXT service_id=194 ]

PiperOrigin-RevId: 395864574
2021-09-09 23:47:26 -07:00
jfcarroll 1d7eca3825 Initial implementation of SubmittableExecutor
PiperOrigin-RevId: 395576173
2021-09-08 15:54:05 -07:00
jfcarroll 7cf55178be Update to winrt headers
PiperOrigin-RevId: 395381851
2021-09-07 19:31:14 -07:00
jfcarroll 84821862b5 Initial implementation of Executor
PiperOrigin-RevId: 395381292
2021-09-07 19:24:41 -07:00
edwinwu 1eda3dfc9a analytics: 3p NC: Implement BandwidthUpgradeAttempt.
PiperOrigin-RevId: 394802558
2021-09-03 20:20:28 -07:00
hai007 0ae077bc4f [Sharing][Analytics] Adding logging for missing permission request status (BT/wifi/location/airplane mode).
PiperOrigin-RevId: 394772766
2021-09-03 16:00:34 -07:00
hai007 f78c8ac5a0 [Sharing][Analytics]
1. Adding acceptance status logging for  LAUNCH_CONSENT event.
2. add new consent type for device contact consent.

PiperOrigin-RevId: 394745696
2021-09-03 13:24:53 -07:00
edwinwu 24539d170f analytics: 3p NC: Implement Payload.
PiperOrigin-RevId: 394695112
2021-09-03 09:07:14 -07:00
edwinwu 8d8d435548 update nearby_connections: proto: analytics: BUILD file.
PiperOrigin-RevId: 394663167
2021-09-03 05:32:43 -07:00
hai007 43682b0d2b [Sharing][Analytics] Adding DeclineAgreement logging when user drop off in opt-in page.
PiperOrigin-RevId: 394616282
2021-09-02 22:55:32 -07:00
edwinwu a21b4b55d7 analytics: 3p NC: Implement EstablishedConnections.
PiperOrigin-RevId: 394582833
2021-09-02 18:01:11 -07:00
jfcarroll ada8d857cb Somehow this change was dropped.
PiperOrigin-RevId: 394501870
2021-09-02 11:12:19 -07:00
jfcarroll 17676ac999 Initial implementation of CountDownLatch
PiperOrigin-RevId: 394478506
2021-09-02 09:28:30 -07:00
jfcarroll e721faca4c Missed the copyright date on these
PiperOrigin-RevId: 394477350
2021-09-02 09:23:23 -07:00
edwinwu cef1f5a567 analytics: 3p NC: Implement internal class PendingPayload and LogicalConnection. This is pre-work for EstablishedConnections.
PiperOrigin-RevId: 394404345
2021-09-02 01:05:14 -07:00
hais 011a201ee2 Check in BLE cal interface.
PiperOrigin-RevId: 394298358
2021-09-01 13:13:28 -07:00
jfcarroll e895f3c100 Initial implementation of ConditionVariable and Mutex
PiperOrigin-RevId: 394293910
2021-09-01 12:56:04 -07:00
edwinwu 2a629b2c1b nearby_connections: proto: analytics: sync protos and add unit test for proto ConnectionsLog.
PiperOrigin-RevId: 394164605
2021-08-31 23:45:52 -07:00
eidenkim fd938a745c Added ServiceControllerRouter Init/Close function
PiperOrigin-RevId: 393999592
2021-08-31 07:46:43 -07:00
hai007 67a1271abe Saving the payload files with the file name and parent folder, so that Sharing doesn't have to rename/move the file.
PiperOrigin-RevId: 393929024
2021-08-30 23:26:36 -07:00
edwinwu 15a81bb0bf Fixes memory leak in AnalyticsRecorder.
PiperOrigin-RevId: 393905139
2021-08-30 19:42:32 -07:00
edwinwu f37dfd2e8a Fixes access ponter after free in connection_info.channel->GetMedium()
PiperOrigin-RevId: 393904932
2021-08-30 19:40:21 -07:00
xlythe ebec902cb8 [Windows] Fix build from GetTid removal
PiperOrigin-RevId: 393795930
2021-08-30 10:06:55 -07:00
jfcarroll 9f8d186e42 Updating the winrt headers
After this C/L you must update your Windows SDK to 10.0.20348.0 in order to build on Visual Studio

PiperOrigin-RevId: 393786833
2021-08-30 09:22:59 -07:00