Commit Graph
344 Commits
Author SHA1 Message Date
suetfei acc6f2de9a Move third_party/nearby/cpp/analytics to third_party/nearby/internal/analytics.
PiperOrigin-RevId: 420135432
2022-01-06 13:47:33 -08:00
hais cdcd37c616 update date in readme.md
PiperOrigin-RevId: 420118461
2022-01-06 12:24:04 -08:00
hai007 24d5e10784 Add one NULL_MESSAGE into the Description enum to represent the null case.
PiperOrigin-RevId: 419725172
2022-01-04 18:56:42 -08:00
fdi df0c08007b [Connections][Analytics] Add log source for NC logs.
PiperOrigin-RevId: 417531016
2021-12-21 14:48:30 -08:00
hai007 28ed3c75a4 [Nearby][Analytics] Add logging for device state.
PiperOrigin-RevId: 413681037
2021-12-02 08:09:12 -08:00
hais a192cd3e32 Patch recent cls from nearby_connections;
Sync github to replace nearby_connections with nearby.

PiperOrigin-RevId: 411609608
2021-11-22 11:38:39 -08:00
hai007 083d692205 Update connections_log.proto
PiperOrigin-RevId: 409772395
2021-11-14 01:39:58 -08:00
edwinwu fb0337ebfa ios: nearbyConnections: Move source to //third_party.
PiperOrigin-RevId: 408046875
2021-11-06 09:45:54 -07:00
hai007 8c2dd35eac [Connections] Remove the usage of @BandOrFrequency annotation
BEGIN_PUBLIC
END_PUBLIC

PiperOrigin-RevId: 407726054
2021-11-04 19:36:05 -07:00
hai007 8259c92b37 PhoneHub hopes to keep a long lived connection (over 10 mins) between Android and ChromeOS. However, phone would go to deep sleep mode and not send out KeepAlive even when receiving KeepAlive from CrOS. Here we force a KeepAliveAck back to avoid KeepAlive timeout.
PiperOrigin-RevId: 401454742
2021-10-07 01:59:30 -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
nohle 0d803da06e Replace proto.h includes with pb.h
PiperOrigin-RevId: 399801411
2021-09-29 16:20:05 -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
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
hai007 c56f7a29ba Internal change.
PiperOrigin-RevId: 397581907
2021-09-19 01:53:57 -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
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 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 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
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
xlythe ebec902cb8 [Windows] Fix build from GetTid removal
PiperOrigin-RevId: 393795930
2021-08-30 10:06:55 -07:00
hai007 3e40931286 No changes to public files
PiperOrigin-RevId: 392585608
2021-08-23 21:55:15 -07:00
hai007 dc2d249cc4 For the purpose of better understanding of the WiFi technology device used during Nearby Sharing, We'll log the above parameters into ClearCut server.
Storage increase will be:
1.Build version: take RQ3A.210805.001.A1 as example, it needs 18 bytes in one device, so need 36 bytes in two devices.
2.Incoming or outgoing conection (
    4 bytes tech +
    4 bytes band +
    4 bytes channel +
    6 bytes network_operator +
    2 bytes country_code +
    1 byte tdls +
    4 bytes try_counts +
    1 byte wifi_ap_status +
    4 bytes max_tx_speed +
    4 bytes max_rx_speed) = 34 bytes)
 So need 34*4 = 136 bytes in two directions initial connections and two directions bandwidth upgrades.

So there are total 172 bytes grows in each share.

(172 bytes in each sharing * 400000 shares/daily * 7 days/week) / GB = about 0.45 GB) (400000 was based on current shares/daily in Prod.)

PiperOrigin-RevId: 390282437
2021-08-11 20:57:25 -07:00
hai007 2eba476031 Client is able to send payload when the connection unencrypted, for example, NC allow client to send payload to multiple endpoints when at least one endpoint encrypted, it's a security leak that sending data to other unencrypted endpoint. Reject to send unencrypted data in PayloadManager to fix this.
PiperOrigin-RevId: 390047577
2021-08-10 21:20:06 -07:00
xlythe cb169f5897 Add '//buildenv/target:non_prod' compatibility
PiperOrigin-RevId: 388806419
2021-08-04 16:11:49 -07:00
jsobczak dfc61a8f05 Move license text to BUILD files top
PiperOrigin-RevId: 388579579
2021-08-03 17:10:57 -07:00
hai007 7cefdb9b1f Internal change
PiperOrigin-RevId: 386221204
2021-07-22 06:03:14 -07:00
Edwin Wu f82dc3faa1 Internal change
PiperOrigin-RevId: 386179189
2021-07-22 00:25:35 -07:00
Janusz Sobczak c7fc76825c Internal change
PiperOrigin-RevId: 385836456
2021-07-20 11:45:07 -07:00
hai007 6f54dd6bf9 Internal change
PiperOrigin-RevId: 385702172
2021-07-19 20:46:15 -07:00
hai007 c6a170b71b Internal change
PiperOrigin-RevId: 385574533
2021-07-19 09:39:19 -07:00
hai007 a8fe61d846 Internal change
PiperOrigin-RevId: 385056025
2021-07-15 19:06:17 -07:00
hai007 a1c787e62c Internal change
PiperOrigin-RevId: 383153113
2021-07-05 10:28:50 -07:00
Jyun LuoLai ea51270f4a Internal change
PiperOrigin-RevId: 383086687
2021-07-05 01:07:29 -07:00
hai007 6b2e5d575a Internal change
PiperOrigin-RevId: 382227759
2021-06-29 21:51:16 -07:00
hai007 bac0999371 Internal change
PiperOrigin-RevId: 381580157
2021-06-25 17:50:05 -07:00
hai007 a39ac09461 Internal change
PiperOrigin-RevId: 381407182
2021-06-24 23:10:03 -07:00
Jyun LuoLai 3c4ffe4f8d Internal change
PiperOrigin-RevId: 380739662
2021-06-21 23:07:13 -07:00
hai007 808b6b8578 Internal change
PiperOrigin-RevId: 380693153
2021-06-21 16:47:30 -07:00
Jyun LuoLai 85d5c297b6 Internal change
PiperOrigin-RevId: 378822884
2021-06-11 01:02:26 -07:00
Johnson Lu 945bba5242 Internal change
PiperOrigin-RevId: 378781282
2021-06-10 18:41:42 -07:00
hai007 be588b109e Internal change
PiperOrigin-RevId: 378418724
2021-06-09 09:04:34 -07:00
Will Harmon 99c434f523 Internal change
PiperOrigin-RevId: 378264734
2021-06-08 15:49:53 -07:00
Will Harmon 957ce1052b Internal change
PiperOrigin-RevId: 377867439
2021-06-07 02:13:14 -07:00