From 12371764e666ac0c2a284cac2a72b757eb598995 Mon Sep 17 00:00:00 2001 From: hai007 Date: Sat, 3 Aug 2024 20:28:12 -0700 Subject: [PATCH] 1. Logs instant connection result code to advertise phase, discovery phase or connection attempts. 2. Adds one new result code CONNECTIVITY_AUTO_RESUME_FAILURE for reconnection PiperOrigin-RevId: 659207468 --- internal/proto/analytics/connections_log.proto | 8 ++++++++ proto/connections_enums.proto | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/internal/proto/analytics/connections_log.proto b/internal/proto/analytics/connections_log.proto index 7993f18a..3601bd3f 100644 --- a/internal/proto/analytics/connections_log.proto +++ b/internal/proto/analytics/connections_log.proto @@ -95,6 +95,10 @@ message ConnectionsLog { // The result code of the operation result optional location.nearby.proto.connections.OperationResultCode result_code = 4; + + // The connection mode. + optional location.nearby.proto.connections.ConnectionMode connection_mode = + 5; } // One round of a particular Strategy done by a client. @@ -311,6 +315,10 @@ message ConnectionsLog { // The result code of this connection attempt optional OperationResult operation_result = 9; + + // The connection mode. + optional location.nearby.proto.connections.ConnectionMode connection_mode = + 10; } // A successfully-established connection over a particular medium. diff --git a/proto/connections_enums.proto b/proto/connections_enums.proto index ca0f201c..b32d9283 100644 --- a/proto/connections_enums.proto +++ b/proto/connections_enums.proto @@ -987,6 +987,10 @@ enum OperationResultCode { CONNECTIVITY_LAN_MDNS_REGISTER_FAILURE = 3597; // Failed to change BT scan mode CONNECTIVITY_BLUETOOTH_CHANGE_SCAN_MODE_FAILURE = 3598; + // Auto resume failure + CONNECTIVITY_AUTO_RESUME_FAILURE = 3599; + // Timeout when listening instant connection + CONNECTIVITY_INSTANT_CONNECTION_LISTENING_TIMEOUT = 3600; // Section of CATEGORY_NEARBY_ERROR, from 4500 // NO BLE MAC address associated to the GATT advertisement @@ -1172,6 +1176,8 @@ enum OperationResultCode { NEARBY_WEB_RTC_INVALID_PCP_OPTIONS = 4584; // Bluetooth starts scanning without any client existed. NEARBY_BLUETOOTH_NO_CLIENT_REGISTER_FOR_SCAN = 4585; + // TX Advertisement on a wrong connectivity info. + NEARBY_INSTANT_CONNECTION_WRONG_CONNECTIVITY_INFO = 4586; } enum StopAdvertisingReason {