From 12277611642fa108610522704a7bea9af0cb0ec5 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sun, 5 May 2024 06:38:01 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=97=A0=E6=B3=95=E6=8B=89=E8=B5=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84ability=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: Ibcbe4f8732fd8bbe39d6583c3c799c9365dfbe69 --- service/key_command/src/key_command_handler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service/key_command/src/key_command_handler.cpp b/service/key_command/src/key_command_handler.cpp index 9eacb63c2e..751809e040 100644 --- a/service/key_command/src/key_command_handler.cpp +++ b/service/key_command/src/key_command_handler.cpp @@ -1418,6 +1418,7 @@ void KeyCommandHandler::CreateStatusConfigObserver(T& item) MMI_HILOGE("Get value from setting date fail"); return; } + MMI_HILOGI("Config changed key:%{public}s value:%{public}d", key.c_str(), statusValue); item.statusConfigValue = statusValue; }; sptr statusObserver = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID) @@ -1427,6 +1428,15 @@ void KeyCommandHandler::CreateStatusConfigObserver(T& item) MMI_HILOGE("register setting observer failed, ret=%{public}d", ret); statusObserver = nullptr; } + bool configVlaue = true; + ret = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID) + .GetBoolValue(item.statusConfig, configVlaue); + if (ret != RET_OK) { + MMI_HILOGE("Get value from setting date fail"); + return; + } + MMI_HILOGE("Get value success key:%{public}s value:%{public}d", item.statusConfig.c_str(), configVlaue); + item.statusConfigValue = configVlaue; } std::shared_ptr KeyCommandHandler::CreateKeyEvent(int32_t keyCode, int32_t keyAction, bool isPressed) -- Gitee From 0961e0824fe996b9474fe243401beb5430bcc0d1 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Sun, 5 May 2024 09:45:30 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8C=89=E9=94=AE?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=97=A0=E6=B3=95=E6=8B=89=E8=B5=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84ability=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: If25a95a7ad24c7f370062113f8ddbb4758f0a178 --- service/key_command/src/key_command_handler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/key_command/src/key_command_handler.cpp b/service/key_command/src/key_command_handler.cpp index 751809e040..a41f0d2d94 100644 --- a/service/key_command/src/key_command_handler.cpp +++ b/service/key_command/src/key_command_handler.cpp @@ -1435,7 +1435,7 @@ void KeyCommandHandler::CreateStatusConfigObserver(T& item) MMI_HILOGE("Get value from setting date fail"); return; } - MMI_HILOGE("Get value success key:%{public}s value:%{public}d", item.statusConfig.c_str(), configVlaue); + MMI_HILOGI("Get value success key:%{public}s value:%{public}d", item.statusConfig.c_str(), configVlaue); item.statusConfigValue = configVlaue; } -- Gitee