Loading libs/androidfw/AssetManager2.cpp +0 −47 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ #include <map> #include <set> #include <span> #include <sstream> #include <utility> #include "android-base/logging.h" Loading Loading @@ -445,24 +444,6 @@ bool AssetManager2::ContainsAllocatedTable() const { return false; } static std::string ConfigVecToString(std::span<const ResTable_config> configurations) { std::stringstream ss; ss << "["; bool first = true; for (const auto& config : configurations) { if (!first) { ss << ","; } char out[RESTABLE_MAX_LOCALE_LEN] = {}; config.getBcp47Locale(out); ss << out; first = false; } ss << "]"; return ss.str(); } void AssetManager2::SetConfigurations(std::span<const ResTable_config> configurations, bool force_refresh) { int diff = 0; Loading @@ -478,16 +459,6 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura } } // Log the locale list change to investigate b/392255526 if (diff & ConfigDescription::CONFIG_LOCALE) { auto oldstr = ConfigVecToString(configurations_); auto newstr = ConfigVecToString(configurations); if (oldstr != newstr) { LOG(INFO) << "AssetManager2(" << this << ") locale list changing from " << oldstr << " to " << newstr; } } configurations_.clear(); for (auto&& config : configurations) { configurations_.emplace_back(config); Loading @@ -499,24 +470,6 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura } void AssetManager2::SetDefaultLocale(std::optional<ResTable_config> default_locale) { int diff = 0; if (default_locale_ && default_locale) { diff = default_locale_->diff(default_locale.value()); } else if (default_locale_ || default_locale) { diff = -1; } if (diff & ConfigDescription::CONFIG_LOCALE) { char old_loc[RESTABLE_MAX_LOCALE_LEN] = {}; char new_loc[RESTABLE_MAX_LOCALE_LEN] = {}; if (default_locale_) { default_locale_->getBcp47Locale(old_loc); } if (default_locale) { default_locale->getBcp47Locale(new_loc); } LOG(INFO) << "AssetManager2(" << this << ") default locale changing from '" << old_loc << "' to '" << new_loc << "'"; } default_locale_ = default_locale; } Loading Loading
libs/androidfw/AssetManager2.cpp +0 −47 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ #include <map> #include <set> #include <span> #include <sstream> #include <utility> #include "android-base/logging.h" Loading Loading @@ -445,24 +444,6 @@ bool AssetManager2::ContainsAllocatedTable() const { return false; } static std::string ConfigVecToString(std::span<const ResTable_config> configurations) { std::stringstream ss; ss << "["; bool first = true; for (const auto& config : configurations) { if (!first) { ss << ","; } char out[RESTABLE_MAX_LOCALE_LEN] = {}; config.getBcp47Locale(out); ss << out; first = false; } ss << "]"; return ss.str(); } void AssetManager2::SetConfigurations(std::span<const ResTable_config> configurations, bool force_refresh) { int diff = 0; Loading @@ -478,16 +459,6 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura } } // Log the locale list change to investigate b/392255526 if (diff & ConfigDescription::CONFIG_LOCALE) { auto oldstr = ConfigVecToString(configurations_); auto newstr = ConfigVecToString(configurations); if (oldstr != newstr) { LOG(INFO) << "AssetManager2(" << this << ") locale list changing from " << oldstr << " to " << newstr; } } configurations_.clear(); for (auto&& config : configurations) { configurations_.emplace_back(config); Loading @@ -499,24 +470,6 @@ void AssetManager2::SetConfigurations(std::span<const ResTable_config> configura } void AssetManager2::SetDefaultLocale(std::optional<ResTable_config> default_locale) { int diff = 0; if (default_locale_ && default_locale) { diff = default_locale_->diff(default_locale.value()); } else if (default_locale_ || default_locale) { diff = -1; } if (diff & ConfigDescription::CONFIG_LOCALE) { char old_loc[RESTABLE_MAX_LOCALE_LEN] = {}; char new_loc[RESTABLE_MAX_LOCALE_LEN] = {}; if (default_locale_) { default_locale_->getBcp47Locale(old_loc); } if (default_locale) { default_locale->getBcp47Locale(new_loc); } LOG(INFO) << "AssetManager2(" << this << ") default locale changing from '" << old_loc << "' to '" << new_loc << "'"; } default_locale_ = default_locale; } Loading