diff --git a/MODULE.bazel b/MODULE.bazel index 7e47108b..61269bef 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -14,7 +14,7 @@ git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "g git_repository( name = "beto-core", - commit = "415bd032561d078720642d52e28fd3bc9d5155d4", + commit = "479289ef072b0880c0347d36937265e44f00f4ee", remote = "https://beto-core.googlesource.com/beto-core", ) diff --git a/gen_proto.sh b/gen_proto.sh index 0cb7500d..09a33ed5 100755 --- a/gen_proto.sh +++ b/gen_proto.sh @@ -16,8 +16,8 @@ COMPILED_PROTO_PATH="compiled_proto" -${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} connections/implementation/proto/offline_wire_formats.proto ${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} internal/proto/analytics/connections_log.proto +${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} internal/proto/analytics/fast_pair_log.proto ${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} sharing/proto/analytics/nearby_sharing_log.proto -${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} proto/connections_enums.proto +${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} proto/fast_pair_enums.proto ${PROTOC} --cpp_out=${COMPILED_PROTO_PATH} proto/sharing_enums.proto diff --git a/presence/implementation/advertisement_decoder_rust_impl.cc b/presence/implementation/advertisement_decoder_rust_impl.cc index cecfe2c1..9ff10320 100644 --- a/presence/implementation/advertisement_decoder_rust_impl.cc +++ b/presence/implementation/advertisement_decoder_rust_impl.cc @@ -37,19 +37,10 @@ namespace nearby { namespace presence { namespace { -absl::StatusOr MapAction(const ActionBit action) { - switch (action) { - case ActionBit::kActiveUnlockAction: - return nearby_protocol::ActionType::ActiveUnlock; - case ActionBit::kNearbyShareAction: - return nearby_protocol::ActionType::NearbyShare; - case ActionBit::kInstantTetheringAction: - return nearby_protocol::ActionType::InstantTethering; - case ActionBit::kPhoneHubAction: - return nearby_protocol::ActionType::PhoneHub; - default: - return absl::InvalidArgumentError("Unsupported action type"); - } +absl::StatusOr<::nearby_protocol::ActionType> MapAction( + const ActionBit action) { + return ::nearby_protocol::ActionType::TryBuildFromU8( + static_cast(action)); } void AddActionsToAdvertisement(const nearby_protocol::V0Actions& parsed_actions,