色彩校正模式更新

Signed-off-by: zhanghuiyu_5451 <zhanghuiyu9@huawei.com>
This commit is contained in:
zhanghuiyu_5451 2023-10-10 18:46:16 +08:00
parent 9a2a3f6786
commit 4fe547e605

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");
}