From 49fb175f340b58b178b836e480e0bb96c7bc9c4c Mon Sep 17 00:00:00 2001 From: hai007 Date: Wed, 7 Jun 2023 10:19:33 -0700 Subject: [PATCH] Add instance type to metadata to differentiate personal or managed profiles. PiperOrigin-RevId: 538524943 --- internal/proto/metadata.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/internal/proto/metadata.proto b/internal/proto/metadata.proto index 022bd22f..abd9a861 100644 --- a/internal/proto/metadata.proto +++ b/internal/proto/metadata.proto @@ -57,6 +57,9 @@ message Metadata { // The Bluetooth MAC address of the device. bytes bluetooth_mac_address = 6; + + // The instance type (user profile) related to the metadata. + InstanceType instance_type = 7; } // The type of the device. @@ -89,3 +92,19 @@ enum DeviceType { // The device is a foldable. DEVICE_TYPE_FOLDABLE = 8; } + +// The instance type of the metadata. +// LINT.IfChange +enum InstanceType { + // Unknown instance type. + INSTANCE_TYPE_UNKNOWN = 0; + + // The metadata is associated with the main instance. (Usually + // first-registered personal profile.) + INSTANCE_TYPE_MAIN = 1; + + // The metadata is associated with a secondary instance, such as a working + // profile. + INSTANCE_TYPE_SECONDARY = 2; +} +// LINT.ThenChange(//depot/google3/java/com/google/android/gmscore/integ/client/nearby/src/com/google/android/gms/nearby/connection/Device.java)