mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Add DeviceMetadata to FastPairDevice after downloading it. It simplifies the code and prevents fetching the same metadata several times. FastPairDataEncryptorImpl does not download the metadata anymore. Metadata must have already been downloaded, otherwise we wouldn't know what FP protocol to use. PiperOrigin-RevId: 542490742
136 lines
3.4 KiB
Python
136 lines
3.4 KiB
Python
licenses(["notice"])
|
|
|
|
cc_library(
|
|
name = "common",
|
|
srcs = [
|
|
"account_key_filter.cc",
|
|
"battery_notification.cc",
|
|
"fast_pair_device.cc",
|
|
"fast_pair_http_result.cc",
|
|
"fast_pair_prefs.cc",
|
|
"fast_pair_switches.cc",
|
|
"pair_failure.cc",
|
|
"protocol.cc",
|
|
],
|
|
hdrs = [
|
|
"account_key.h",
|
|
"account_key_filter.h",
|
|
"battery_notification.h",
|
|
"constant.h",
|
|
"device_metadata.h",
|
|
"fast_pair_device.h",
|
|
"fast_pair_http_result.h",
|
|
"fast_pair_prefs.h",
|
|
"fast_pair_switches.h",
|
|
"fast_pair_version.h",
|
|
"non_discoverable_advertisement.h",
|
|
"pair_failure.h",
|
|
"protocol.h",
|
|
],
|
|
visibility = [
|
|
"//fastpair:__subpackages__",
|
|
],
|
|
deps = [
|
|
"//fastpair/proto:fastpair_cc_proto",
|
|
"//internal/crypto",
|
|
"//internal/platform:logging",
|
|
"//internal/preferences",
|
|
"@com_google_absl//absl/base:core_headers",
|
|
"@com_google_absl//absl/container:flat_hash_map",
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "account_key_filter_test",
|
|
size = "small",
|
|
srcs = [
|
|
"account_key_filter_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "fast_pair_device_test",
|
|
size = "small",
|
|
srcs = [
|
|
"fast_pair_device_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//fastpair/proto:fastpair_cc_proto",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "pair_failure_test",
|
|
size = "small",
|
|
srcs = [
|
|
"pair_failure_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "battery_notification_test",
|
|
size = "small",
|
|
srcs = [
|
|
"battery_notification_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "fast_pair_prefs_test",
|
|
size = "small",
|
|
srcs = [
|
|
"fast_pair_prefs_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "fast_pair_switches_test",
|
|
size = "small",
|
|
srcs = [
|
|
"fast_pair_switches_test.cc",
|
|
],
|
|
shard_count = 16,
|
|
deps = [
|
|
":common",
|
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|