diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index 4dcf263..913b3af 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -158,8 +158,8 @@ using namespace MessageID; void InputMethodController::Attach(sptr &listener) { - PrepareInput(0,mClient,mInputDataChannel,mAttribute); - textListener=listener; + PrepareInput(0, mClient,mInputDataChannel,mAttribute); + textListener = listener; } void InputMethodController::ShowTextInput() diff --git a/unitest/src/input_method_controller_test.cpp b/unitest/src/input_method_controller_test.cpp index dc95211..4a41ce7 100644 --- a/unitest/src/input_method_controller_test.cpp +++ b/unitest/src/input_method_controller_test.cpp @@ -198,12 +198,12 @@ namespace MiscServices { sptr textListener = new TextListener(); IMSA_HILOGI("IMC Attach START"); - imc->Attach(); + imc->Attach(textListener); int waitForStatusOk = 2; sleep(waitForStatusOk); IMSA_HILOGI("IMC ShowTextInput START"); - imc->ShowTextInput(textListener); + imc->ShowTextInput(); sleep(10); IMSA_HILOGI("IMC HideTextInput START");