From 8a3cadac4d7573b342fcd44557c015a684492c8d Mon Sep 17 00:00:00 2001 From: hai007 Date: Mon, 21 Oct 2024 12:25:45 -0700 Subject: [PATCH] [Quick Share QR Code] Log QR code session start and stop events PiperOrigin-RevId: 688230725 --- proto/sharing_enums.proto | 5 ++++- sharing/proto/analytics/nearby_sharing_log.proto | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/proto/sharing_enums.proto b/proto/sharing_enums.proto index feda5593..8995f606 100644 --- a/proto/sharing_enums.proto +++ b/proto/sharing_enums.proto @@ -32,7 +32,7 @@ option objc_class_prefix = "GNSHP"; // in NearbyClearcutLogger (for android, or clearcut_event_logger as the // equivalence for Windows) for all events (may exclude settings), and // session_id for a pair of events (start and end of a session). -// Next id: 70 +// Next id: 71 enum EventType { UNKNOWN_EVENT_TYPE = 0; @@ -303,6 +303,9 @@ enum EventType { // RPC call status RPC_CALL_STATUS = 69; + // A QR code sharing session has started + START_QR_CODE_SESSION = 70; + // LINT.ThenChange(//depot/google3/location/nearby/proto/nearby_event_codes.proto:SharingEventCode) } diff --git a/sharing/proto/analytics/nearby_sharing_log.proto b/sharing/proto/analytics/nearby_sharing_log.proto index f9762959..9f436c39 100644 --- a/sharing/proto/analytics/nearby_sharing_log.proto +++ b/sharing/proto/analytics/nearby_sharing_log.proto @@ -31,7 +31,7 @@ option objc_class_prefix = "GNCP"; // Top-level log proto for all NearbySharing logging. // Each log contains a key (event_type), value (a verb-noun event) pair. -// Next Tag: 79 +// Next Tag: 80 // LINT.IfChange message SharingLog { /* collection_basis = { @@ -214,6 +214,8 @@ message SharingLog { optional RpcCallStatus rpc_call_status = 78; + optional StartQrCodeSession start_qr_code_session = 79; + // Used only for Nearby Share Windows app now. message AppInfo { // e.g. "1.0.408" @@ -360,6 +362,10 @@ message SharingLog { optional location.nearby.proto.sharing.ScanType scan_type = 3; optional int64 flow_id = 4 /* type = ST_SESSION_ID */; optional string referrer_name = 5; + // Represents whether this scan was started with an active QR code session + // that can be used to help discover targets that have scanned the same QR + // code + optional bool use_qr_code = 6; } // EventType: SCAN_FOR_SHARE_TARGETS_END @@ -922,5 +928,8 @@ message SharingLog { // Latency of RPC call in milliseconds. optional int64 latency_millis = 4; } + + // EventType: START_QR_CODE_SESSION + message StartQrCodeSession {} } // LINT.ThenChange(//depot/google3/logs/proto/location/nearby/nearby_client_log.proto)