Commit Graph
162 Commits
Author SHA1 Message Date
suetfei cbba00a38a Create ble_frames.pb.cc 2022-04-04 00:52:36 -07:00
suetfei 1af4066c2e Create error_code_enums.pb.h 2022-04-04 00:51:09 -07:00
suetfei f5bb4ff3c0 Create error_code_enums.pb.cc 2022-04-04 00:50:35 -07:00
suetfei 5f606aac59 Create connections_enums.pb.h 2022-04-04 00:49:27 -07:00
suetfei 29be0ce842 Create connections_enums.pb.cc 2022-04-04 00:48:15 -07:00
suetfei e6752f3348 Update README for iOS & macOS Build.
PiperOrigin-RevId: 438758043
2022-04-01 00:43:03 -07:00
deling-google 1f7ad3b553 Add protos and headers 2022-03-31 12:44:50 -07:00
suetfei d65e41cc4a Internal Flow Fix
PiperOrigin-RevId: 438157831
2022-03-29 16:41:43 -07:00
hai007 e74b650980 Adding Annotations
PiperOrigin-RevId: 437668370
2022-03-27 22:05:03 -07:00
suetfei fe8bb9a880 Internal script change
PiperOrigin-RevId: 431088787
2022-02-25 20:58:58 -08:00
suetfei 3c8a279829 Add WORKSPACE and .bazelrc and make other changes for bazel build.
PiperOrigin-RevId: 428343135
2022-02-13 08:50:47 -08:00
suetfei 37f8b4487e Internal flow change phase 2.
PiperOrigin-RevId: 427059704
2022-02-07 17:17:20 -08:00
fdi 7661019dc3 [Sharing] Setup self share analytics.
PiperOrigin-RevId: 427048806
2022-02-07 16:29:02 -08:00
hais a5086f3878 Modify copybara rules
PiperOrigin-RevId: 426029875
2022-02-02 19:09:34 -08:00
suetfei 287f0d7174 Internal Flow change for BUILD.
PiperOrigin-RevId: 424991730
2022-02-02 11:51:37 -08:00
suetfei 5bc20e2ea4 Internal cleaup for protos.
PiperOrigin-RevId: 424738503
2022-02-02 11:44:51 -08:00
suetfei 5e845655bb [Nearby Directory Refactoring] Move nearby/proto codes into the appropriate directories.
PiperOrigin-RevId: 421636973
2022-01-13 12:48:51 -08:00
hai007 c90f1d023e 1. In b/206869351, WiFi framework already relaxed the permission checking for WifiManager.getCountryCode() API from requesting NETWORK_SETTING permission to COARSE location. So we can change our code to get country code from WifiManager from Android T.
2. Remove @SuppressWarnings("nullness") in Utils class.

PiperOrigin-RevId: 420221014
2022-01-06 23:24:18 -08:00
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