aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@google.com>2016-04-21 19:20:06 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-21 19:20:06 +0000
commitb1601f6b51ad88045b9f3e083cf3fe65b63d8742 (patch)
treecd2296e55306daea485131b575e1e1bd6b31dfed
parentd67ba4472671786dd45380515a4132bc57ce35e9 (diff)
parentebd4538fe7ee5c9266412f4a05649ba542f27c43 (diff)
downloadweaved-b1601f6b51ad88045b9f3e083cf3fe65b63d8742.tar.gz
weaved: Fix LocalAccessEnabled flags to reflect changes in libweave
am: ebd4538fe7 * commit 'ebd4538fe7ee5c9266412f4a05649ba542f27c43': weaved: Fix LocalAccessEnabled flags to reflect changes in libweave Change-Id: Icf884e8467b090f7b772ca3ee431ba808041a214
-rw-r--r--buffet/buffet_config.cc9
-rw-r--r--buffet/buffet_config_unittest.cc6
2 files changed, 5 insertions, 10 deletions
diff --git a/buffet/buffet_config.cc b/buffet/buffet_config.cc
index 16672f6..942cd3c 100644
--- a/buffet/buffet_config.cc
+++ b/buffet/buffet_config.cc
@@ -60,8 +60,7 @@ const char kName[] = "name";
const char kDescription[] = "description";
const char kLocation[] = "location";
const char kLocalAnonymousAccessRole[] = "local_anonymous_access_role";
-const char kLocalDiscoveryEnabled[] = "local_discovery_enabled";
-const char kLocalPairingEnabled[] = "local_pairing_enabled";
+const char kLocalAccessEnabled[] = "local_access_enabled";
const char kOemName[] = "oem_name";
const char kModelName[] = "model_name";
const char kModelId[] = "model_id";
@@ -149,10 +148,8 @@ bool BuffetConfig::LoadDefaults(const brillo::KeyValueStore& store,
if (!StringToEnum(role_str, &settings->local_anonymous_access_role))
return false;
}
- store.GetBoolean(config_keys::kLocalDiscoveryEnabled,
- &settings->local_discovery_enabled);
- store.GetBoolean(config_keys::kLocalPairingEnabled,
- &settings->local_pairing_enabled);
+ store.GetBoolean(config_keys::kLocalAccessEnabled,
+ &settings->local_access_enabled);
store.GetBoolean(config_keys::kAllowEndpointsOverride,
&settings->allow_endpoints_override);
return true;
diff --git a/buffet/buffet_config_unittest.cc b/buffet/buffet_config_unittest.cc
index 24c8a72..373a18c 100644
--- a/buffet/buffet_config_unittest.cc
+++ b/buffet/buffet_config_unittest.cc
@@ -42,8 +42,7 @@ TEST(BuffetConfigTest, LoadConfig) {
config_store.SetString("description", "conf_description");
config_store.SetString("location", "conf_location");
config_store.SetString("local_anonymous_access_role", "user");
- config_store.SetBoolean("local_pairing_enabled", false);
- config_store.SetBoolean("local_discovery_enabled", false);
+ config_store.SetBoolean("local_access_enabled", false);
config_store.SetBoolean("allow_endpoints_override", true);
// Following will be ignored.
@@ -74,8 +73,7 @@ TEST(BuffetConfigTest, LoadConfig) {
EXPECT_EQ("conf_description", settings.description);
EXPECT_EQ("conf_location", settings.location);
EXPECT_EQ(weave::AuthScope::kUser, settings.local_anonymous_access_role);
- EXPECT_FALSE(settings.local_pairing_enabled);
- EXPECT_FALSE(settings.local_discovery_enabled);
+ EXPECT_FALSE(settings.local_access_enabled);
EXPECT_TRUE(settings.allow_endpoints_override);
}