From 2add27671b223ffd4eec16cafa32dd46deaea04b Mon Sep 17 00:00:00 2001 From: hai007 Date: Mon, 12 May 2025 19:39:40 -0700 Subject: [PATCH] Support XR devices for QuickShare DeviceType PiperOrigin-RevId: 758009685 --- proto/sharing_enums.proto | 2 ++ sharing/advertisement.cc | 1 + sharing/common/nearby_share_enums.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/proto/sharing_enums.proto b/proto/sharing_enums.proto index 49134482..99d87c26 100644 --- a/proto/sharing_enums.proto +++ b/proto/sharing_enums.proto @@ -538,6 +538,8 @@ enum DeviceType { TABLET = 2; LAPTOP = 3; CAR = 4; + FOLDABLE = 5; + XR = 6; } // TODO(fdi): may eventually include windows, iOS, etc. diff --git a/sharing/advertisement.cc b/sharing/advertisement.cc index 34458086..16c7eaaf 100644 --- a/sharing/advertisement.cc +++ b/sharing/advertisement.cc @@ -101,6 +101,7 @@ bool IsKnownDeviceValue(int32_t value) { case 3: case 4: case 5: + case 6: return true; default: return false; diff --git a/sharing/common/nearby_share_enums.h b/sharing/common/nearby_share_enums.h index aa8c72fe..ea51e1b3 100644 --- a/sharing/common/nearby_share_enums.h +++ b/sharing/common/nearby_share_enums.h @@ -57,6 +57,8 @@ enum class ShareTargetType { kCar = 4, // A foldable. kFoldable = 5, + // An XR device. + kXR = 6, }; // LINT.ThenChange( // //depot/google3/location/nearby/cpp/sharing/clients/proto/share_target.proto:ShareTarget.ShareTargetType,