diff --git a/frameworks/inputmethod_ability/src/input_method_ability.cpp b/frameworks/inputmethod_ability/src/input_method_ability.cpp index 7e6ddfb..7a26b6b 100644 --- a/frameworks/inputmethod_ability/src/input_method_ability.cpp +++ b/frameworks/inputmethod_ability/src/input_method_ability.cpp @@ -426,7 +426,8 @@ namespace MiscServices { return; } - int32_t InputMethodAbility::GetEnterKeyType() { + int32_t InputMethodAbility::GetEnterKeyType() + { IMSA_HILOGI("InputMethodAbility::GetEnterKeyType"); if (inputDataChannel == nullptr) { @@ -436,7 +437,8 @@ namespace MiscServices { return inputDataChannel->GetEnterKeyType(); } - int32_t InputMethodAbility::GetInputPattern() { + int32_t InputMethodAbility::GetInputPattern() + { IMSA_HILOGI("InputMethodAbility::GetInputPattern"); if (inputDataChannel == nullptr) { @@ -446,7 +448,8 @@ namespace MiscServices { return inputDataChannel->GetInputPattern(); } - void InputMethodAbility::StopInput() { + void InputMethodAbility::StopInput() + { IMSA_HILOGI("InputMethodAbility::StopInput"); if (inputDataChannel == nullptr) { diff --git a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp index ba952c1..9e24df4 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp @@ -78,6 +78,7 @@ namespace MiscServices { sptr channelObject = inputControlChannel->AsObject(); if (channelObject == nullptr) { IMSA_HILOGI("InputMethodCoreProxy::InitInputControlChannel channelObject is nullptr"); + return ErrorCode::ERROR_EX_NULL_POINTER; } data.WriteRemoteObject(channelObject); MessageOption option { diff --git a/interfaces/kits/js/napi/inputmethodengine/src/js_editor_attribute.cpp b/interfaces/kits/js/napi/inputmethodengine/src/js_editor_attribute.cpp index b833d92..9612dd9 100644 --- a/interfaces/kits/js/napi/inputmethodengine/src/js_editor_attribute.cpp +++ b/interfaces/kits/js/napi/inputmethodengine/src/js_editor_attribute.cpp @@ -22,8 +22,6 @@ #include "input_method_ability.h" namespace OHOS { namespace MiscServices { -// constexpr size_t ARGC_ZERO = 0; - void JsEditorAttribute::Finalizer(NativeEngine* engine, void* data, void* hint) { IMSA_HILOGI("JsEditorAttribute::Finalizer is called"); diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index 177e6fb..ed92d25 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -884,6 +884,7 @@ namespace MiscServices { IMSA_HILOGI("InputMethodSystemAbility::OnDisplayOptionalInputMethod has no ime"); return; } + std::string defaultIme = ParaHandle::GetDefaultIme(userId_); std::string params = ""; std::vector::iterator it; diff --git a/services/src/platform_callback_stub.cpp b/services/src/platform_callback_stub.cpp index e90a4e7..352b006 100644 --- a/services/src/platform_callback_stub.cpp +++ b/services/src/platform_callback_stub.cpp @@ -34,6 +34,10 @@ namespace MiscServices { int PlatformCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { + auto descriptorToken = data.ReadInterfaceToken(); + if (descriptorToken != GetDescriptor()) { + return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION; + } switch (code) { case NOTIFY_EVENT: { int eventId = data.ReadInt32();