From 4afcf75177f7c138824e908bc55f24e43c2061c9 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 19 Jan 2022 08:48:23 -0800 Subject: [PATCH] Remove unused configuration items from ConfigurationMgr (#13672) --- src/include/platform/ConfigurationManager.h | 4 -- .../GenericConfigurationManagerImpl.cpp | 46 ------------------- .../GenericConfigurationManagerImpl.h | 4 -- src/platform/Ameba/AmebaConfig.cpp | 2 - src/platform/Ameba/AmebaConfig.h | 2 - src/platform/Darwin/PosixConfig.cpp | 2 - src/platform/Darwin/PosixConfig.h | 2 - src/platform/EFR32/EFR32Config.h | 6 +-- src/platform/ESP32/ESP32Config.cpp | 2 - src/platform/ESP32/ESP32Config.h | 2 - src/platform/Linux/PosixConfig.cpp | 2 - src/platform/Linux/PosixConfig.h | 2 - src/platform/P6/P6Config.cpp | 2 - src/platform/P6/P6Config.h | 2 - src/platform/Tizen/PosixConfig.cpp | 2 - src/platform/Tizen/PosixConfig.h | 2 - src/platform/Zephyr/ZephyrConfig.cpp | 3 -- src/platform/Zephyr/ZephyrConfig.h | 2 - src/platform/android/AndroidConfig.cpp | 2 - src/platform/android/AndroidConfig.h | 4 +- .../chip/platform/ConfigurationManager.java | 2 - .../cc13x2_26x2/CC13X2_26X2Config.cpp | 8 +--- src/platform/cc13x2_26x2/CC13X2_26X2Config.h | 2 - src/platform/fake/ConfigurationManagerImpl.h | 4 -- src/platform/mbed/MbedConfig.cpp | 2 - src/platform/mbed/MbedConfig.h | 2 - src/platform/nxp/k32w/k32w0/K32W0Config.h | 2 - src/platform/qpg/qpgConfig.h | 2 - src/platform/tests/TestConfigurationMgr.cpp | 30 ------------ 29 files changed, 6 insertions(+), 143 deletions(-) diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 40fa50f2fa6c05..28b044ee896e9b 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -103,8 +103,6 @@ class ConfigurationManager virtual CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) = 0; - virtual CHIP_ERROR GetHourFormat(uint8_t & format) = 0; - virtual CHIP_ERROR GetCalendarType(uint8_t & type) = 0; virtual CHIP_ERROR StoreSerialNumber(const char * serialNum, size_t serialNumLen) = 0; virtual CHIP_ERROR StorePrimaryWiFiMACAddress(const uint8_t * buf) = 0; virtual CHIP_ERROR StorePrimary802154MACAddress(const uint8_t * buf) = 0; @@ -116,8 +114,6 @@ class ConfigurationManager virtual CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) = 0; - virtual CHIP_ERROR StoreHourFormat(uint8_t format) = 0; - virtual CHIP_ERROR StoreCalendarType(uint8_t type) = 0; virtual CHIP_ERROR GetRebootCount(uint32_t & rebootCount) = 0; virtual CHIP_ERROR StoreRebootCount(uint32_t rebootCount) = 0; virtual CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index 11ac8979aad52d..72d5875abbe21e 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -321,52 +321,6 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreRegulatoryLocation return WriteConfigValue(ConfigClass::kConfigKey_RegulatoryLocation, value); } -template -CHIP_ERROR GenericConfigurationManagerImpl::GetHourFormat(uint8_t & format) -{ - uint32_t value = 0; - - CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_HourFormat, value); - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); - format = static_cast(value); - } - - return err; -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::StoreHourFormat(uint8_t format) -{ - uint32_t value = format; - return WriteConfigValue(ConfigClass::kConfigKey_HourFormat, value); -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::GetCalendarType(uint8_t & type) -{ - uint32_t value = 0; - - CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_CalendarType, value); - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); - type = static_cast(value); - } - - return err; -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::StoreCalendarType(uint8_t type) -{ - uint32_t value = type; - return WriteConfigValue(ConfigClass::kConfigKey_CalendarType, value); -} - template CHIP_ERROR GenericConfigurationManagerImpl::GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) { diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index d29a0ed2a38240..7fb9554ae0737c 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -110,10 +110,6 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override; CHIP_ERROR GetReachable(bool & reachable) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; - CHIP_ERROR GetHourFormat(uint8_t & format) override; - CHIP_ERROR StoreHourFormat(uint8_t format) override; - CHIP_ERROR GetCalendarType(uint8_t & type) override; - CHIP_ERROR StoreCalendarType(uint8_t type) override; CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 4e23b7c115db21..56de35a1e38b9b 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -74,8 +74,6 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_RegulatoryLocation = { k const AmebaConfig::Key AmebaConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AmebaConfig::Key AmebaConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AmebaConfig::Key AmebaConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const AmebaConfig::Key AmebaConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index 1ba6bf7c37a6f8..1bc3b21aa82e02 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -68,8 +68,6 @@ class AmebaConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/Darwin/PosixConfig.cpp b/src/platform/Darwin/PosixConfig.cpp index ea815f11832a5c..5ee3104038b4d4 100644 --- a/src/platform/Darwin/PosixConfig.cpp +++ b/src/platform/Darwin/PosixConfig.cpp @@ -67,8 +67,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Darwin/PosixConfig.h b/src/platform/Darwin/PosixConfig.h index 1d852822078c43..009433a91d4a5a 100644 --- a/src/platform/Darwin/PosixConfig.h +++ b/src/platform/Darwin/PosixConfig.h @@ -74,8 +74,6 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index c008db24251489..295c6f8e08af1d 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -95,10 +95,8 @@ class EFR32Config static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_HourFormat = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); - static constexpr Key kConfigKey_CalendarType = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E); - static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0F); - static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1C); // Allows 16 Group Keys to be created. // CHIP Counter Keys static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00); diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index a41a86c0002b15..5b2d6ea2f3073e 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -73,8 +73,6 @@ const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const ESP32Config::Key ESP32Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const ESP32Config::Key ESP32Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const ESP32Config::Key ESP32Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const ESP32Config::Key ESP32Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const ESP32Config::Key ESP32Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index a16254d661579d..75ff577b28c0e6 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -75,8 +75,6 @@ class ESP32Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 7187070494043a..3c09fa7b7a7808 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -73,8 +73,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const PosixConfig::Key PosixConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index 4b38910fb65ea5..e4361af27e216e 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -77,8 +77,6 @@ class PosixConfig static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_LocationCapability; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index 6cfe10aa2f7ebd..a41e744d6eaa17 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -71,8 +71,6 @@ const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; const P6Config::Key P6Config::kConfigKey_WiFiSSID = { kConfigNamespace_ChipConfig, "wifi-ssid" }; const P6Config::Key P6Config::kConfigKey_WiFiPassword = { kConfigNamespace_ChipConfig, "wifi-password" }; const P6Config::Key P6Config::kConfigKey_WiFiSecurity = { kConfigNamespace_ChipConfig, "wifi-security" }; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index b59b57f07dd951..58981769415557 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -76,8 +76,6 @@ class P6Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_WiFiSSID; static const Key kConfigKey_WiFiPassword; static const Key kConfigKey_WiFiSecurity; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index fa8fce00810827..92d0009356d685 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -68,8 +68,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 37cdbcb1aea540..e4beca4391b5b7 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -74,8 +74,6 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_ActiveLocale; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/Zephyr/ZephyrConfig.cpp b/src/platform/Zephyr/ZephyrConfig.cpp index c151ccb23ac32a..2bf321b4582ef3 100644 --- a/src/platform/Zephyr/ZephyrConfig.cpp +++ b/src/platform/Zephyr/ZephyrConfig.cpp @@ -72,8 +72,6 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_ActiveLocale = CONFIG_KEY(NAMESPACE_CONFIG "active-locale"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_Breadcrumb = CONFIG_KEY(NAMESPACE_CONFIG "breadcrumb"); -const ZephyrConfig::Key ZephyrConfig::kConfigKey_HourFormat = CONFIG_KEY(NAMESPACE_CONFIG "hour-format"); -const ZephyrConfig::Key ZephyrConfig::kConfigKey_CalendarType = CONFIG_KEY(NAMESPACE_CONFIG "calendar-type"); // Keys stored in the counters namespace const ZephyrConfig::Key ZephyrConfig::kCounterKey_RebootCount = CONFIG_KEY(NAMESPACE_COUNTERS "reboot-count"); @@ -89,7 +87,6 @@ constexpr const char * sAllResettableConfigKeys[] = { ZephyrConfig::kConfigKey_LastUsedEpochKeyId, ZephyrConfig::kConfigKey_FailSafeArmed, ZephyrConfig::kConfigKey_RegulatoryLocation, ZephyrConfig::kConfigKey_CountryCode, ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb, - ZephyrConfig::kConfigKey_HourFormat, ZephyrConfig::kConfigKey_CalendarType, }; // Data structure to be passed as a parameter of Zephyr's settings_load_subtree_direct() function diff --git a/src/platform/Zephyr/ZephyrConfig.h b/src/platform/Zephyr/ZephyrConfig.h index 7afffaccbf95ad..b7e3c63f63da21 100644 --- a/src/platform/Zephyr/ZephyrConfig.h +++ b/src/platform/Zephyr/ZephyrConfig.h @@ -64,8 +64,6 @@ class ZephyrConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_BootReason; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index 1488c56f2715ae..cf6f4d506a9f8b 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -93,8 +93,6 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AndroidConfig::Key AndroidConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char AndroidConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index a9db855ef49979..d1c92fe518a166 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -1,3 +1,5 @@ + + /* * * Copyright (c) 2020-2021 Project CHIP Authors @@ -76,8 +78,6 @@ class AndroidConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_ProductId; static const Key kConfigKey_ProductName; static const Key kConfigKey_SoftwareVersion; diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index cd79a0c8fd3bd0..a3aed3df257ecf 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -61,8 +61,6 @@ public interface ConfigurationManager { String kConfigKey_CountryCode = "country-code"; String kConfigKey_ActiveLocale = "active-locale"; String kConfigKey_Breadcrumb = "breadcrumb"; - String kConfigKey_HourFormat = "hour-format"; - String kConfigKey_CalendarType = "calendar-type"; // Prefix used for NVS keys that contain Chip group encryption keys. String kGroupKeyNamePrefix = "gk-"; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index b379581b9252a8..c934a2e9bb35e4 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -89,16 +89,12 @@ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = .itemID = 0x001c } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001d } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HourFormat = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001e } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CalendarType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001f } }; /* Internal for the KVS interface. */ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_key = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x0020 } }; + .itemID = 0x001e } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_value = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x0021 } }; + .itemID = 0x001f } }; /* Static local variables */ static NVINTF_nvFuncts_t sNvoctpFps = { 0 }; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h index 854a7692eaf212..034a067906fc43 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h @@ -67,8 +67,6 @@ class CC13X2_26X2Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_KVS_key; // special key for KVS system, key storage static const Key kConfigKey_KVS_value; // special key for KVS system, value storage diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index fd9b571ee7bb9e..88d0f452618541 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -98,10 +98,6 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetReachable(bool & reachable) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override { return CHIP_ERROR_NOT_IMPLEMENTED; } - CHIP_ERROR GetHourFormat(uint8_t & format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR StoreHourFormat(uint8_t format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR GetCalendarType(uint8_t & type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR StoreCalendarType(uint8_t type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; #if !defined(NDEBUG) CHIP_ERROR RunUnitTests(void) override { return CHIP_ERROR_NOT_IMPLEMENTED; } #endif diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index aab9e6916ca9ed..608d732ce61425 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -82,8 +82,6 @@ const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; const MbedConfig::Key MbedConfig::kConfigKey_ActiveLocale = { CONFIG_KEY("active-locale") }; const MbedConfig::Key MbedConfig::kConfigKey_Breadcrumb = { CONFIG_KEY("breadcrumb") }; -const MbedConfig::Key MbedConfig::kConfigKey_HourFormat = { CONFIG_KEY("hour-format") }; -const MbedConfig::Key MbedConfig::kConfigKey_CalendarType = { CONFIG_KEY("calendar-type") }; CHIP_ERROR MbedConfig::ReadConfigValue(Key key, bool & val) { diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index 09ce576d1760d0..21d33df304e140 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -73,8 +73,6 @@ class MbedConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // Config value accessors. static CHIP_ERROR ReadConfigValue(Key key, bool & val); diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index da73746d4d463c..b5cf3c6e23c0c4 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -89,8 +89,6 @@ class K32WConfig static constexpr Key kConfigKey_CountryCode = K32WConfigKey(kPDMId_ChipConfig, 0x08); static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); static constexpr Key kConfigKey_ActiveLocale = K32WConfigKey(kPDMId_ChipConfig, 0x0A); - static constexpr Key kConfigKey_HourFormat = K32WConfigKey(kPDMId_ChipConfig, 0x0B); - static constexpr Key kConfigKey_CalendarType = K32WConfigKey(kPDMId_ChipConfig, 0x0C); // CHIP Counter Keys static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); diff --git a/src/platform/qpg/qpgConfig.h b/src/platform/qpg/qpgConfig.h index 9c5130537de218..7a8079c80914a4 100644 --- a/src/platform/qpg/qpgConfig.h +++ b/src/platform/qpg/qpgConfig.h @@ -86,8 +86,6 @@ class QPGConfig static constexpr Key kConfigKey_CountryCode = QorvoConfigKey(kFileId_ChipConfig, 0x0A); static constexpr Key kConfigKey_Breadcrumb = QorvoConfigKey(kFileId_ChipConfig, 0x0B); static constexpr Key kConfigKey_ActiveLocale = QorvoConfigKey(kFileId_ChipConfig, 0x0C); - static constexpr Key kConfigKey_HourFormat = QorvoConfigKey(kFileId_ChipConfig, 0x0D); - static constexpr Key kConfigKey_CalendarType = QorvoConfigKey(kFileId_ChipConfig, 0x0E); static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0F); static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1E); // Allows 16 Group Keys to be created. diff --git a/src/platform/tests/TestConfigurationMgr.cpp b/src/platform/tests/TestConfigurationMgr.cpp index 450e7a15f8bbcc..04d8998271627b 100644 --- a/src/platform/tests/TestConfigurationMgr.cpp +++ b/src/platform/tests/TestConfigurationMgr.cpp @@ -245,34 +245,6 @@ static void TestConfigurationMgr_ActiveLocale(nlTestSuite * inSuite, void * inCo NL_TEST_ASSERT(inSuite, strcmp(buf, activeLocale) == 0); } -static void TestConfigurationMgr_HourFormat(nlTestSuite * inSuite, void * inContext) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t format = 0; - - err = ConfigurationMgr().StoreHourFormat(3); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - err = ConfigurationMgr().GetHourFormat(format); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(inSuite, format == 3); -} - -static void TestConfigurationMgr_CalendarType(nlTestSuite * inSuite, void * inContext) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t type = 0; - - err = ConfigurationMgr().StoreCalendarType(3); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - err = ConfigurationMgr().GetCalendarType(type); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(inSuite, type == 3); -} - /** * Test Suite. It lists all the test functions. */ @@ -291,8 +263,6 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test ConfigurationMgr::Breadcrumb", TestConfigurationMgr_Breadcrumb), NL_TEST_DEF("Test ConfigurationMgr::GetPrimaryMACAddress", TestConfigurationMgr_GetPrimaryMACAddress), NL_TEST_DEF("Test ConfigurationMgr::ActiveLocale", TestConfigurationMgr_ActiveLocale), - NL_TEST_DEF("Test ConfigurationMgr::HourFormat", TestConfigurationMgr_HourFormat), - NL_TEST_DEF("Test ConfigurationMgr::CalendarType", TestConfigurationMgr_CalendarType), NL_TEST_SENTINEL() };