From ad570de0797aa2b7620355223ac90692aaac3ff9 Mon Sep 17 00:00:00 2001 From: Hollokin Date: Thu, 15 Jun 2023 14:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=9C=8D=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9D=83=E9=99=90=E7=AE=A1=E6=8E=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hollokin --- CODEOWNERS | 17 +++ .../src/input_method_system_ability_proxy.cpp | 120 +++++++++++------- .../include/i_input_method_system_ability.h | 24 ---- .../input_method_system_ability_stub.h | 45 +++++++ .../inputmethod_service_ipc_interface_code.h | 3 +- .../src/input_method_system_ability_stub.cpp | 69 +--------- 6 files changed, 141 insertions(+), 137 deletions(-) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..5d587525 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + any change to services/include/inputmethod_service_ipc_interface_code.h needs to be reviewed by @lenochan5 + services/include/inputmethod_service_ipc_interface_code.h @leonchan5 \ No newline at end of file diff --git a/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp b/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp index ff156bf2..0ee36754 100644 --- a/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp +++ b/frameworks/native/inputmethod_controller/src/input_method_system_ability_proxy.cpp @@ -16,6 +16,7 @@ #include "input_method_system_ability_proxy.h" #include "global.h" +#include "inputmethod_service_ipc_interface_code.h" #include "itypes_util.h" #include "message_option.h" @@ -31,74 +32,81 @@ InputMethodSystemAbilityProxy::InputMethodSystemAbilityProxy(const sptr(InputMethodInterfaceCode::PREPARE_INPUT), [&inputClientInfo](MessageParcel &data) { + return ITypesUtil::Marshal(data, inputClientInfo); + }); } int32_t InputMethodSystemAbilityProxy::StartInput(sptr client, bool isShowKeyboard) { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(START_INPUT, [isShowKeyboard, client](MessageParcel &data) { - return data.WriteRemoteObject(client->AsObject()) && data.WriteBool(isShowKeyboard); - }); + return SendRequest( + static_cast(InputMethodInterfaceCode::START_INPUT), [isShowKeyboard, client](MessageParcel &data) { + return data.WriteRemoteObject(client->AsObject()) && data.WriteBool(isShowKeyboard); + }); } int32_t InputMethodSystemAbilityProxy::ShowCurrentInput() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(SHOW_CURRENT_INPUT); + return SendRequest(static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT)); } int32_t InputMethodSystemAbilityProxy::HideCurrentInput() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(HIDE_CURRENT_INPUT); + return SendRequest(static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT)); } int32_t InputMethodSystemAbilityProxy::StopInputSession() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(STOP_INPUT_SESSION); + return SendRequest(static_cast(InputMethodInterfaceCode::STOP_INPUT_SESSION)); } int32_t InputMethodSystemAbilityProxy::StopInput(sptr client) { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest( - STOP_INPUT, [client](MessageParcel &data) { return data.WriteRemoteObject(client->AsObject()); }); + return SendRequest(static_cast(InputMethodInterfaceCode::STOP_INPUT), [client](MessageParcel &data) { + return data.WriteRemoteObject(client->AsObject()); + }); } int32_t InputMethodSystemAbilityProxy::ReleaseInput(sptr client) { - return SendRequest( - RELEASE_INPUT, [client](MessageParcel &data) { return data.WriteRemoteObject(client->AsObject()); }); + return SendRequest(static_cast(InputMethodInterfaceCode::RELEASE_INPUT), [client](MessageParcel &data) { + return data.WriteRemoteObject(client->AsObject()); + }); } int32_t InputMethodSystemAbilityProxy::DisplayOptionalInputMethod() { IMSA_HILOGI("%{public}s in", __func__); - return SendRequest(DISPLAY_OPTIONAL_INPUT_METHOD); + return SendRequest(static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_METHOD)); } int32_t InputMethodSystemAbilityProxy::SetCoreAndAgent(sptr core, sptr agent) { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(SET_CORE_AND_AGENT, [core, agent](MessageParcel &data) { - return data.WriteRemoteObject(core->AsObject()) && data.WriteRemoteObject(agent->AsObject()); - }); + return SendRequest( + static_cast(InputMethodInterfaceCode::SET_CORE_AND_AGENT), [core, agent](MessageParcel &data) { + return data.WriteRemoteObject(core->AsObject()) && data.WriteRemoteObject(agent->AsObject()); + }); } std::shared_ptr InputMethodSystemAbilityProxy::GetCurrentInputMethod() { IMSA_HILOGD("%{public}s in", __func__); std::shared_ptr property = nullptr; - int32_t ret = SendRequest(GET_CURRENT_INPUT_METHOD, nullptr, [&property](MessageParcel &reply) { - property = std::make_shared(); - if (property == nullptr) { - IMSA_HILOGE("%{public}s make_shared nullptr", __func__); - return false; - } - return ITypesUtil::Unmarshal(reply, *property); - }); + int32_t ret = SendRequest(static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD), nullptr, + [&property](MessageParcel &reply) { + property = std::make_shared(); + if (property == nullptr) { + IMSA_HILOGE("%{public}s make_shared nullptr", __func__); + return false; + } + return ITypesUtil::Unmarshal(reply, *property); + }); return ret != ErrorCode::NO_ERROR ? nullptr : property; } @@ -106,14 +114,15 @@ std::shared_ptr InputMethodSystemAbilityProxy::GetCurrentInputMetho { IMSA_HILOGD("%{public}s in", __func__); std::shared_ptr property = nullptr; - int32_t ret = SendRequest(GET_CURRENT_INPUT_METHOD_SUBTYPE, nullptr, [&property](MessageParcel &reply) { - property = std::make_shared(); - if (property == nullptr) { - IMSA_HILOGE("%{public}s make_shared nullptr", __func__); - return false; - } - return ITypesUtil::Unmarshal(reply, *property); - }); + int32_t ret = SendRequest(static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD_SUBTYPE), + nullptr, [&property](MessageParcel &reply) { + property = std::make_shared(); + if (property == nullptr) { + IMSA_HILOGE("%{public}s make_shared nullptr", __func__); + return false; + } + return ITypesUtil::Unmarshal(reply, *property); + }); return ret != ErrorCode::NO_ERROR ? nullptr : property; } @@ -121,26 +130,31 @@ int32_t InputMethodSystemAbilityProxy::ListInputMethod(InputMethodStatus status, { IMSA_HILOGD("%{public}s in", __func__); return SendRequest( - LIST_INPUT_METHOD, [status](MessageParcel &data) { return ITypesUtil::Marshal(data, uint32_t(status)); }, - [&props](MessageParcel &reply) { return ITypesUtil::Unmarshal(reply, props); }); + static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD), + [status](MessageParcel &data) { + return ITypesUtil::Marshal(data, uint32_t(status)); + }, + [&props](MessageParcel &reply) { + return ITypesUtil::Unmarshal(reply, props); + }); } int32_t InputMethodSystemAbilityProxy::ShowCurrentInputDeprecated() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(SHOW_CURRENT_INPUT_DEPRECATED); + return SendRequest(static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT_DEPRECATED)); } int32_t InputMethodSystemAbilityProxy::HideCurrentInputDeprecated() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(HIDE_CURRENT_INPUT_DEPRECATED); + return SendRequest(static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT_DEPRECATED)); } int32_t InputMethodSystemAbilityProxy::DisplayOptionalInputMethodDeprecated() { IMSA_HILOGD("%{public}s in", __func__); - return SendRequest(DISPLAY_OPTIONAL_INPUT_DEPRECATED); + return SendRequest(static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_DEPRECATED)); } int32_t InputMethodSystemAbilityProxy::ListInputMethodSubtype( @@ -148,38 +162,50 @@ int32_t InputMethodSystemAbilityProxy::ListInputMethodSubtype( { IMSA_HILOGD("InputMethodSystemAbilityProxy::ListInputMethodSubtype"); return SendRequest( - LIST_INPUT_METHOD_SUBTYPE, [&name](MessageParcel &data) { return ITypesUtil::Marshal(data, name); }, - [&subProps](MessageParcel &reply) { return ITypesUtil::Unmarshal(reply, subProps); }); + static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD_SUBTYPE), + [&name](MessageParcel &data) { + return ITypesUtil::Marshal(data, name); + }, + [&subProps](MessageParcel &reply) { + return ITypesUtil::Unmarshal(reply, subProps); + }); } int32_t InputMethodSystemAbilityProxy::ListCurrentInputMethodSubtype(std::vector &subProps) { IMSA_HILOGD("InputMethodSystemAbilityProxy::ListCurrentInputMethodSubtype"); - return SendRequest(LIST_CURRENT_INPUT_METHOD_SUBTYPE, nullptr, - [&subProps](MessageParcel &reply) { return ITypesUtil::Unmarshal(reply, subProps); }); + return SendRequest(static_cast(InputMethodInterfaceCode::LIST_CURRENT_INPUT_METHOD_SUBTYPE), nullptr, + [&subProps](MessageParcel &reply) { + return ITypesUtil::Unmarshal(reply, subProps); + }); } int32_t InputMethodSystemAbilityProxy::SwitchInputMethod(const std::string &name, const std::string &subName) { IMSA_HILOGD("InputMethodSystemAbilityProxy::SwitchInputMethod"); - return SendRequest(SWITCH_INPUT_METHOD, - [&name, &subName](MessageParcel &data) { return ITypesUtil::Marshal(data, name, subName); }); + return SendRequest( + static_cast(InputMethodInterfaceCode::SWITCH_INPUT_METHOD), [&name, &subName](MessageParcel &data) { + return ITypesUtil::Marshal(data, name, subName); + }); } int32_t InputMethodSystemAbilityProxy::PanelStatusChange( const InputWindowStatus &status, const InputWindowInfo &windowInfo) { IMSA_HILOGD("InputMethodSystemAbilityProxy::PanelStatusChange"); - return SendRequest(PANEL_STATUS_CHANGE, [status, windowInfo](MessageParcel &data) { - return ITypesUtil::Marshal(data, static_cast(status), windowInfo); - }); + return SendRequest(static_cast(InputMethodInterfaceCode::PANEL_STATUS_CHANGE), + [status, windowInfo](MessageParcel &data) { + return ITypesUtil::Marshal(data, static_cast(status), windowInfo); + }); } int32_t InputMethodSystemAbilityProxy::UpdateListenEventFlag(InputClientInfo &clientInfo, EventType eventType) { IMSA_HILOGD("InputMethodSystemAbilityProxy::UpdateListenEventFlag"); - return SendRequest(UPDATE_LISTEN_EVENT_FLAG, - [&clientInfo, eventType](MessageParcel &data) { return ITypesUtil::Marshal(data, clientInfo, eventType); }); + return SendRequest(static_cast(InputMethodInterfaceCode::UPDATE_LISTEN_EVENT_FLAG), + [&clientInfo, eventType](MessageParcel &data) { + return ITypesUtil::Marshal(data, clientInfo, eventType); + }); } int32_t InputMethodSystemAbilityProxy::SendRequest(int code, ParcelHandler input, ParcelHandler output) diff --git a/services/include/i_input_method_system_ability.h b/services/include/i_input_method_system_ability.h index 28161575..53fc7863 100644 --- a/services/include/i_input_method_system_ability.h +++ b/services/include/i_input_method_system_ability.h @@ -38,30 +38,6 @@ namespace OHOS { namespace MiscServices { class IInputMethodSystemAbility : public IRemoteBroker { public: - enum CommandId : int32_t { - PREPARE_INPUT = 0, - START_INPUT, - SHOW_CURRENT_INPUT, - HIDE_CURRENT_INPUT, - STOP_INPUT, - STOP_INPUT_SESSION, - RELEASE_INPUT, - GET_CURRENT_INPUT_METHOD, - GET_CURRENT_INPUT_METHOD_SUBTYPE, - LIST_INPUT_METHOD, - LIST_INPUT_METHOD_SUBTYPE, - LIST_CURRENT_INPUT_METHOD_SUBTYPE, - SWITCH_INPUT_METHOD, - DISPLAY_OPTIONAL_INPUT_METHOD, - SET_CORE_AND_AGENT, - SHOW_CURRENT_INPUT_DEPRECATED, - HIDE_CURRENT_INPUT_DEPRECATED, - DISPLAY_OPTIONAL_INPUT_DEPRECATED, - PANEL_STATUS_CHANGE, - UPDATE_LISTEN_EVENT_FLAG, - INPUT_SERVICE_CMD_LAST - }; - DECLARE_INTERFACE_DESCRIPTOR(u"ohos.miscservices.inputmethod.IInputMethodSystemAbility"); virtual int32_t PrepareInput(InputClientInfo &clientInfo) = 0; diff --git a/services/include/input_method_system_ability_stub.h b/services/include/input_method_system_ability_stub.h index 95f0bfa5..517876ce 100644 --- a/services/include/input_method_system_ability_stub.h +++ b/services/include/input_method_system_ability_stub.h @@ -20,6 +20,7 @@ #include "global.h" #include "i_input_method_system_ability.h" +#include "inputmethod_service_ipc_interface_code.h" #include "iremote_stub.h" #include "message_parcel.h" #include "refbase.h" @@ -70,6 +71,50 @@ private: int32_t HideCurrentInputOnRemoteDeprecated(MessageParcel &data, MessageParcel &reply); int32_t ShowCurrentInputOnRemoteDeprecated(MessageParcel &data, MessageParcel &reply); + + using RequestHandler = int32_t (InputMethodSystemAbilityStub::*)(MessageParcel &, MessageParcel &); + static constexpr RequestHandler HANDLERS[static_cast(InputMethodInterfaceCode::IMS_CMD_LAST)] = { + [static_cast(InputMethodInterfaceCode::PREPARE_INPUT)] = + &InputMethodSystemAbilityStub::PrepareInputOnRemote, + [static_cast(InputMethodInterfaceCode::START_INPUT)] = + &InputMethodSystemAbilityStub::StartInputOnRemote, + [static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT)] = + &InputMethodSystemAbilityStub::ShowCurrentInputOnRemote, + [static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT)] = + &InputMethodSystemAbilityStub::HideCurrentInputOnRemote, + [static_cast(InputMethodInterfaceCode::STOP_INPUT)] = + &InputMethodSystemAbilityStub::StopInputOnRemote, + [static_cast(InputMethodInterfaceCode::RELEASE_INPUT)] = + &InputMethodSystemAbilityStub::ReleaseInputOnRemote, + [static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD)] = + &InputMethodSystemAbilityStub::GetCurrentInputMethodOnRemote, + [static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD_SUBTYPE)] = + &InputMethodSystemAbilityStub::GetCurrentInputMethodSubtypeOnRemote, + [static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD)] = + &InputMethodSystemAbilityStub::ListInputMethodOnRemote, + [static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD_SUBTYPE)] = + &InputMethodSystemAbilityStub::ListInputMethodSubtypeOnRemote, + [static_cast(InputMethodInterfaceCode::LIST_CURRENT_INPUT_METHOD_SUBTYPE)] = + &InputMethodSystemAbilityStub::ListCurrentInputMethodSubtypeOnRemote, + [static_cast(InputMethodInterfaceCode::SWITCH_INPUT_METHOD)] = + &InputMethodSystemAbilityStub::SwitchInputMethodOnRemote, + [static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_METHOD)] = + &InputMethodSystemAbilityStub::DisplayOptionalInputMethodOnRemote, + [static_cast(InputMethodInterfaceCode::SET_CORE_AND_AGENT)] = + &InputMethodSystemAbilityStub::SetCoreAndAgentOnRemote, + [static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT_DEPRECATED)] = + &InputMethodSystemAbilityStub::ShowCurrentInputOnRemoteDeprecated, + [static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT_DEPRECATED)] = + &InputMethodSystemAbilityStub::HideCurrentInputOnRemoteDeprecated, + [static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_DEPRECATED)] = + &InputMethodSystemAbilityStub::DisplayInputOnRemoteDeprecated, + [static_cast(InputMethodInterfaceCode::STOP_INPUT_SESSION)] = + &InputMethodSystemAbilityStub::StopInputSessionOnRemote, + [static_cast(InputMethodInterfaceCode::PANEL_STATUS_CHANGE)] = + &InputMethodSystemAbilityStub::PanelStatusChangeOnRemote, + [static_cast(InputMethodInterfaceCode::UPDATE_LISTEN_EVENT_FLAG)] = + &InputMethodSystemAbilityStub::UpdateListenEventFlagOnRemote, + }; }; } // namespace OHOS::MiscServices diff --git a/services/include/inputmethod_service_ipc_interface_code.h b/services/include/inputmethod_service_ipc_interface_code.h index 4bf792a0..b2cae255 100644 --- a/services/include/inputmethod_service_ipc_interface_code.h +++ b/services/include/inputmethod_service_ipc_interface_code.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * Copyright (C) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,6 +40,7 @@ enum class InputMethodInterfaceCode { DISPLAY_OPTIONAL_INPUT_DEPRECATED, PANEL_STATUS_CHANGE, UPDATE_LISTEN_EVENT_FLAG, + IMS_CMD_LAST }; } // namespace MiscServices } // namespace OHOS diff --git a/services/src/input_method_system_ability_stub.cpp b/services/src/input_method_system_ability_stub.cpp index cac1e2c0..02066f45 100644 --- a/services/src/input_method_system_ability_stub.cpp +++ b/services/src/input_method_system_ability_stub.cpp @@ -21,7 +21,6 @@ #include "input_data_channel_proxy.h" #include "input_method_agent_proxy.h" #include "input_method_core_proxy.h" -#include "inputmethod_service_ipc_interface_code.h" #include "ipc_skeleton.h" #include "itypes_util.h" #include "os_account_manager.h" @@ -38,71 +37,11 @@ int32_t InputMethodSystemAbilityStub::OnRemoteRequest( IMSA_HILOGE("%{public}s descriptor failed", __func__); return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION; } - switch (code) { - case static_cast(InputMethodInterfaceCode::PREPARE_INPUT): - PrepareInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::START_INPUT): - StartInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT): - ShowCurrentInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT): - HideCurrentInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::STOP_INPUT): - StopInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::RELEASE_INPUT): - ReleaseInputOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD): - GetCurrentInputMethodOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::STOP_INPUT_SESSION): - StopInputSessionOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD_SUBTYPE): - GetCurrentInputMethodSubtypeOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD): - ListInputMethodOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::LIST_INPUT_METHOD_SUBTYPE): - ListInputMethodSubtypeOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::LIST_CURRENT_INPUT_METHOD_SUBTYPE): - ListCurrentInputMethodSubtypeOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::SWITCH_INPUT_METHOD): - SwitchInputMethodOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_METHOD): - DisplayOptionalInputMethodOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::SET_CORE_AND_AGENT): - SetCoreAndAgentOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::SHOW_CURRENT_INPUT_DEPRECATED): - ShowCurrentInputOnRemoteDeprecated(data, reply); - break; - case static_cast(InputMethodInterfaceCode::HIDE_CURRENT_INPUT_DEPRECATED): - HideCurrentInputOnRemoteDeprecated(data, reply); - break; - case static_cast(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_DEPRECATED): - DisplayInputOnRemoteDeprecated(data, reply); - break; - case static_cast(InputMethodInterfaceCode::PANEL_STATUS_CHANGE): - PanelStatusChangeOnRemote(data, reply); - break; - case static_cast(InputMethodInterfaceCode::UPDATE_LISTEN_EVENT_FLAG): - UpdateListenEventFlagOnRemote(data, reply); - break; - default: - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); + if (code >= 0 && code < static_cast(InputMethodInterfaceCode::IMS_CMD_LAST)) { + return (this->*HANDLERS[code])(data, reply); + } else { + return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } - return ErrorCode::NO_ERROR; } int32_t InputMethodSystemAbilityStub::PrepareInputOnRemote(MessageParcel &data, MessageParcel &reply)