From 92a61bd6e4e3b7c3620d3d97f16479b10e91db0e Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Wed, 30 Mar 2022 01:42:20 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=BA=E6=99=BA=E8=83=BD=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- .../inputmethod_controller/include/input_method_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/inputmethod_controller/include/input_method_controller.h b/frameworks/inputmethod_controller/include/input_method_controller.h index 3744a5b..6365276 100644 --- a/frameworks/inputmethod_controller/include/input_method_controller.h +++ b/frameworks/inputmethod_controller/include/input_method_controller.h @@ -90,7 +90,7 @@ namespace MiscServices { sptr mImms; sptr deathRecipient_; sptr mAgent; - OnTextChangedListener *textListener; + sptr &textListener; InputAttribute mAttribute; std::u16string mTextString; int mSelectOldBegin = 0; From a6462d41be309b75d891e4edc0df9c8b9da16e23 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Wed, 30 Mar 2022 01:46:38 +0000 Subject: [PATCH 2/3] refresh Signed-off-by: zhouyongfei --- .../src/input_method_controller.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index eab6588..5feec06 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -67,7 +67,7 @@ using namespace MessageID; mAttribute.SetInputPattern(InputAttribute::PATTERN_TEXT); textListener = nullptr; - IMSA_HILOGI("InputMethodController::Initialize textListener is nullptr"); + IMSA_HILOGI("InputMethodController::Initialize textListener is nullptr"); PrepareInput(0, mClient, mInputDataChannel, mAttribute); return true; } @@ -105,7 +105,7 @@ using namespace MessageID; case MSG_ID_INSERT_CHAR: { MessageParcel *data = msg->msgContent_; std::u16string text = data->ReadString16(); - IMSA_HILOGI("InputMethodController::WorkThread InsertText"); + IMSA_HILOGI("InputMethodController::WorkThread InsertText"); if (textListener) { textListener->InsertText(text); } @@ -115,7 +115,7 @@ using namespace MessageID; case MSG_ID_DELETE_FORWARD: { MessageParcel *data = msg->msgContent_; int32_t length = data->ReadInt32(); - IMSA_HILOGI("InputMethodController::WorkThread DeleteForward"); + IMSA_HILOGI("InputMethodController::WorkThread DeleteForward"); if (textListener) { textListener->DeleteForward(length); } @@ -124,7 +124,7 @@ using namespace MessageID; case MSG_ID_DELETE_BACKWARD: { MessageParcel *data = msg->msgContent_; int32_t length = data->ReadInt32(); - IMSA_HILOGI("InputMethodController::WorkThread DeleteBackward"); + IMSA_HILOGI("InputMethodController::WorkThread DeleteBackward"); if (textListener) { textListener->DeleteBackward(length); } @@ -168,7 +168,7 @@ using namespace MessageID; int32_t ret = data->ReadInt32(); KeyboardInfo *info = new KeyboardInfo(); info->SetFunctionKey(ret); - IMSA_HILOGI("InputMethodController::WorkThread SendKeyboardInfo"); + IMSA_HILOGI("InputMethodController::WorkThread SendKeyboardInfo"); if (textListener) { textListener->SendKeyboardInfo(*info); } @@ -178,7 +178,7 @@ using namespace MessageID; case MSG_ID_MOVE_CURSOR: { MessageParcel *data = msg->msgContent_; int32_t ret = data->ReadInt32(); - IMSA_HILOGI("InputMethodController::WorkThread MoveCursor"); + IMSA_HILOGI("InputMethodController::WorkThread MoveCursor"); if (textListener) { Direction direction = static_cast(ret); textListener->MoveCursor(direction); @@ -197,7 +197,7 @@ using namespace MessageID; void InputMethodController::Attach(sptr &listener) { textListener = listener; - IMSA_HILOGI("InputMethodController::Attach"); + IMSA_HILOGI("InputMethodController::Attach"); PrepareInput(0, mClient, mInputDataChannel, mAttribute); StartInput(mClient); } @@ -231,7 +231,7 @@ using namespace MessageID; { ReleaseInput(mClient); textListener = nullptr; - IMSA_HILOGI("InputMethodController::Close"); + IMSA_HILOGI("InputMethodController::Close"); } void InputMethodController::PrepareInput(int32_t displayId, sptr &client, From 1a8e2ee60f06a5f131961dcc275373537beb2a85 Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Wed, 30 Mar 2022 06:58:48 +0000 Subject: [PATCH 3/3] refresh Signed-off-by: zhouyongfei --- .../inputmethod_controller/include/input_method_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/inputmethod_controller/include/input_method_controller.h b/frameworks/inputmethod_controller/include/input_method_controller.h index 6365276..0c80239 100644 --- a/frameworks/inputmethod_controller/include/input_method_controller.h +++ b/frameworks/inputmethod_controller/include/input_method_controller.h @@ -90,7 +90,7 @@ namespace MiscServices { sptr mImms; sptr deathRecipient_; sptr mAgent; - sptr &textListener; + sptr textListener; InputAttribute mAttribute; std::u16string mTextString; int mSelectOldBegin = 0;