!751 色彩校正功能实现

Merge pull request !751 from zhanghuiyu/master
This commit is contained in:
openharmony_ci 2023-10-10 12:07:20 +00:00 committed by Gitee
commit a1083954c4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -889,8 +889,14 @@ void AccessibilityConfig::Impl::NotifyDaltonizationColorFilterChanged(
for (auto &observer : observers) {
if (observer) {
ConfigValue configValue;
configValue.daltonizationColorFilter = static_cast<DALTONIZATION_TYPE>(daltonizationColorFilter);
observer->OnConfigChanged(CONFIG_DALTONIZATION_COLOR_FILTER, configValue);
if (!daltonizationState_) {
HILOG_DEBUG();
configValue.daltonizationColorFilter = Normal;
observer->OnConfigChanged(CONFIG_DALTONIZATION_COLOR_FILTER, configValue);
} else {
configValue.daltonizationColorFilter = static_cast<DALTONIZATION_TYPE>(daltonizationColorFilter);
observer->OnConfigChanged(CONFIG_DALTONIZATION_COLOR_FILTER, configValue);
}
} else {
HILOG_ERROR("end configObservers_ is null");
}