Commit Graph
508 Commits
Author SHA1 Message Date
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
hai007 8e2f2da45d Remove GetTid() since it is not used.
PiperOrigin-RevId: 393453493
2021-08-27 16:50:05 -07:00
hai007 ad82c4c489 Updated core_adapter.h to match the change on core_adapter.cc
PiperOrigin-RevId: 393430067
2021-08-27 14:36:32 -07:00
edwinwu 0232b47e02 ios: nearbyConnections: Fixes the issue that can't Advertise and Discover for WifiLan.
- The local WifilanSocket and WifilanService is local variable which will be invalid if out of scope. Move them to the member and let the WifiLanMedium control the life scope.

PiperOrigin-RevId: 393133266
2021-08-26 08:47:32 -07:00
jfcarroll 81b72ab1bf Final implementation of all BluetoothAdapter methods
PiperOrigin-RevId: 393009194
2021-08-25 16:53:17 -07:00
edwinwu 62e7c01cd3 analytics: 3p NC: Implement ConnectionAttempt.
PiperOrigin-RevId: 392794192
2021-08-24 18:44:26 -07:00
hai007 3e40931286 No changes to public files
PiperOrigin-RevId: 392585608
2021-08-23 21:55:15 -07:00
edwinwu c73504e68d analytics: 3p NC: Defines interface EventLogger for Analytics logger.
- this is the init cl.

doc: go/nc-analytics-api
PiperOrigin-RevId: 391901111
2021-08-19 20:03:15 -07:00
hais 7a82740e2b remove ending new line character in attomic_boolean_test.cc
PiperOrigin-RevId: 391602715
2021-08-18 13:53:24 -07:00
edwinwu 56b7daf88d Fixes bluetooth_medium is not supported then don't continue for BleDiscoveredHandler.
PiperOrigin-RevId: 391418495
2021-08-17 17:55:56 -07:00