Workaround for "backward reference detected" issue

PiperOrigin-RevId: 547646854
This commit is contained in:
Guogang Li
2023-07-12 17:34:04 -07:00
committed by Copybara-Service
parent 85a01e9636
commit b113f5550d
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -223,6 +223,7 @@ cc_library(
"//fastpair:__subpackages__",
"//internal/platform/implementation:__subpackages__",
"//presence:__subpackages__",
"//third_party/nearby/sharing:__subpackages__",
],
deps = [
":base",
@@ -24,6 +24,7 @@
#include "absl/strings/string_view.h"
#include "nlohmann/json.hpp"
#include "nlohmann/json_fwd.hpp"
#include "internal/platform/implementation/g3/device_info.h"
#include "internal/platform/implementation/g3/preferences_repository.h"
#include "internal/platform/logging.h"
@@ -35,9 +36,9 @@ using json = ::nlohmann::json;
PreferencesManager::PreferencesManager(absl::string_view file_path)
: api::PreferencesManager(file_path) {
auto device_info = std::make_unique<g3::DeviceInfo>();
std::optional<std::filesystem::path> path =
nearby::api::ImplementationPlatform::CreateDeviceInfo()
->GetLocalAppDataPath();
device_info->GetLocalAppDataPath();
if (!path.has_value()) {
path = std::filesystem::temp_directory_path();
}