mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 22:59:45 +00:00
commit
dbb979bb68
@ -34,6 +34,7 @@ public:
|
||||
static void Traverse(const std::vector<std::shared_ptr<JSCallbackObject>> &objects,
|
||||
const ArgContainer &argContainer = { 0, nullptr })
|
||||
{
|
||||
InputMethodSyncTrace tracer("Traverse callback");
|
||||
for (const auto &object : objects) {
|
||||
JsUtil::ScopeGuard scopeGuard(object->env_);
|
||||
napi_value jsOutput = nullptr;
|
||||
@ -44,7 +45,7 @@ public:
|
||||
static void Traverse(
|
||||
const std::vector<std::shared_ptr<JSCallbackObject>> &objects, const ArgContainer &argContainer, T &output)
|
||||
{
|
||||
InputMethodSyncTrace tracer("Traverse callback");
|
||||
InputMethodSyncTrace tracer("Traverse callback with output");
|
||||
for (const auto &object : objects) {
|
||||
JsUtil::ScopeGuard scopeGuard(object->env_);
|
||||
napi_value jsOutput = nullptr;
|
||||
|
@ -561,7 +561,7 @@ void JsInputMethodEngineSetting::OnInputStart()
|
||||
void JsInputMethodEngineSetting::OnKeyboardStatus(bool isShow)
|
||||
{
|
||||
std::string type = isShow ? "keyboardShow" : "keyboardHide";
|
||||
IMSA_HILOGD("run in, %{public}s", type.c_str());
|
||||
IMSA_HILOGI("run in, %{public}s", type.c_str());
|
||||
uv_work_t *work = GetUVwork(type);
|
||||
if (work == nullptr) {
|
||||
IMSA_HILOGD("failed to get uv entry");
|
||||
@ -694,7 +694,7 @@ uv_work_t *JsInputMethodEngineSetting::GetUVwork(const std::string &type, EntryS
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
|
||||
if (jsCbMap_[type].empty()) {
|
||||
IMSA_HILOGE("%{public}s cb-vector is empty", type.c_str());
|
||||
IMSA_HILOGD("%{public}s cb-vector is empty", type.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
entry = new (std::nothrow) UvEntry(jsCbMap_[type], type);
|
||||
|
@ -71,7 +71,7 @@ void InputMethodAgentProxy::OnConfigurationChange(const Configuration &config)
|
||||
|
||||
int32_t InputMethodAgentProxy::SendRequest(int code, ParcelHandler input, ParcelHandler output)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodAgentProxy::%{public}s in", __func__);
|
||||
IMSA_HILOGI("InputMethodAgentProxy run in, code = %{public}d", code);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option{ MessageOption::TF_SYNC };
|
||||
@ -90,7 +90,7 @@ int32_t InputMethodAgentProxy::SendRequest(int code, ParcelHandler input, Parcel
|
||||
}
|
||||
auto ret = remote->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
IMSA_HILOGE("InputMethodCoreProxy::SendRequest failed, ret %{public}d", ret);
|
||||
IMSA_HILOGE("InputMethodCoreProxy send request failed, code: %{public}d, ret: %{public}d", code, ret);
|
||||
return ret;
|
||||
}
|
||||
if (output != nullptr && (!output(reply))) {
|
||||
|
@ -37,7 +37,7 @@ InputMethodAgentStub::~InputMethodAgentStub()
|
||||
int32_t InputMethodAgentStub::OnRemoteRequest(
|
||||
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
IMSA_HILOGI("InputMethodAgentStub, code = %{public}u, callingPid:%{public}d, callingUid:%{public}d", code,
|
||||
IMSA_HILOGI("InputMethodAgentStub, code = %{public}u, callingPid: %{public}d, callingUid: %{public}d", code,
|
||||
IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
auto descriptorToken = data.ReadInterfaceToken();
|
||||
if (descriptorToken != GetDescriptor()) {
|
||||
|
@ -73,7 +73,7 @@ int32_t InputMethodCoreProxy::ClearDataChannel(const sptr<IInputDataChannel> &ch
|
||||
|
||||
int32_t InputMethodCoreProxy::SendRequest(int code, ParcelHandler input, ParcelHandler output)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodCoreProxy, run in, code = %{public}d", code);
|
||||
IMSA_HILOGI("InputMethodCoreProxy, run in, code = %{public}d", code);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option{ MessageOption::TF_SYNC };
|
||||
@ -87,7 +87,7 @@ int32_t InputMethodCoreProxy::SendRequest(int code, ParcelHandler input, ParcelH
|
||||
}
|
||||
auto ret = Remote()->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
IMSA_HILOGE("InputMethodCoreProxy::SendRequest failed, ret %{public}d", ret);
|
||||
IMSA_HILOGE("InputMethodCoreProxy send request failed, code: %{public}d, ret %{public}d", code, ret);
|
||||
return ret;
|
||||
}
|
||||
ret = reply.ReadInt32();
|
||||
|
@ -40,7 +40,7 @@ InputMethodCoreStub::~InputMethodCoreStub()
|
||||
int32_t InputMethodCoreStub::OnRemoteRequest(
|
||||
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
IMSA_HILOGI("InputMethodCoreStub, code = %{public}u, callingPid:%{public}d, callingUid:%{public}d", code,
|
||||
IMSA_HILOGI("InputMethodCoreStub, code = %{public}u, callingPid: %{public}d, callingUid: %{public}d", code,
|
||||
IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
auto descriptorToken = data.ReadInterfaceToken();
|
||||
if (descriptorToken != GetDescriptor()) {
|
||||
|
@ -68,7 +68,7 @@ int32_t InputClientProxy::SendRequest(int code, ParcelHandler input, ParcelHandl
|
||||
}
|
||||
auto ret = Remote()->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
IMSA_HILOGE("InputClientProxy::SendRequest failed, ret %{public}d", ret);
|
||||
IMSA_HILOGE("InputClientProxy send request failed, code: %{public}d, ret: %{public}d", code, ret);
|
||||
return ret;
|
||||
}
|
||||
ret = reply.ReadInt32();
|
||||
|
@ -36,8 +36,8 @@ InputClientStub::~InputClientStub()
|
||||
int32_t InputClientStub::OnRemoteRequest(
|
||||
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
IMSA_HILOGI("code = %{public}u, callingPid:%{public}d, callingUid:%{public}d", code, IPCSkeleton::GetCallingPid(),
|
||||
IPCSkeleton::GetCallingUid());
|
||||
IMSA_HILOGI("InputClientStub code = %{public}u, callingPid: %{public}d, callingUid: %{public}d", code,
|
||||
IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
auto descriptorToken = data.ReadInterfaceToken();
|
||||
if (descriptorToken != GetDescriptor()) {
|
||||
return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION;
|
||||
|
@ -31,28 +31,24 @@ InputDataChannelProxy::InputDataChannelProxy(const sptr<IRemoteObject> &object)
|
||||
|
||||
int32_t InputDataChannelProxy::InsertText(const std::u16string &text)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
INSERT_TEXT, [&text](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, text); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::DeleteForward(int32_t length)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
DELETE_FORWARD, [length](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, length); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::DeleteBackward(int32_t length)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
DELETE_BACKWARD, [length](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, length); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::GetTextBeforeCursor(int32_t number, std::u16string &text)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
GET_TEXT_BEFORE_CURSOR, [number](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, number); },
|
||||
[&text](MessageParcel &parcel) { return ITypesUtil::Unmarshal(parcel, text);});
|
||||
@ -60,7 +56,6 @@ int32_t InputDataChannelProxy::GetTextBeforeCursor(int32_t number, std::u16strin
|
||||
|
||||
int32_t InputDataChannelProxy::GetTextAfterCursor(int32_t number, std::u16string &text)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
GET_TEXT_AFTER_CURSOR, [number](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, number); },
|
||||
[&text](MessageParcel &parcel) { return ITypesUtil::Unmarshal(parcel, text);});
|
||||
@ -68,28 +63,24 @@ int32_t InputDataChannelProxy::GetTextAfterCursor(int32_t number, std::u16string
|
||||
|
||||
void InputDataChannelProxy::SendKeyboardStatus(int32_t status)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
SendRequest(
|
||||
SEND_KEYBOARD_STATUS, [status](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, status); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::SendFunctionKey(int32_t funcKey)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
SEND_FUNCTION_KEY, [funcKey](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, funcKey); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::MoveCursor(int32_t keyCode)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
MOVE_CURSOR, [keyCode](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, keyCode); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::GetEnterKeyType(int32_t &keyType)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
GET_ENTER_KEY_TYPE, nullptr,
|
||||
[&keyType](MessageParcel &parcel) { return ITypesUtil::Unmarshal(parcel, keyType);});
|
||||
@ -97,7 +88,6 @@ int32_t InputDataChannelProxy::GetEnterKeyType(int32_t &keyType)
|
||||
|
||||
int32_t InputDataChannelProxy::GetInputPattern(int32_t &inputPattern)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
GET_INPUT_PATTERN, nullptr,
|
||||
[&inputPattern](MessageParcel &parcel) { return ITypesUtil::Unmarshal(parcel, inputPattern);});
|
||||
@ -105,7 +95,6 @@ int32_t InputDataChannelProxy::GetInputPattern(int32_t &inputPattern)
|
||||
|
||||
int32_t InputDataChannelProxy::GetTextIndexAtCursor(int32_t &index)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
GET_TEXT_INDEX_AT_CURSOR, nullptr,
|
||||
[&index](MessageParcel &parcel) { return ITypesUtil::Unmarshal(parcel, index);});
|
||||
@ -113,7 +102,6 @@ int32_t InputDataChannelProxy::GetTextIndexAtCursor(int32_t &index)
|
||||
|
||||
int32_t InputDataChannelProxy::GetTextConfig(TextTotalConfig &textConfig)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(GET_TEXT_CONFIG, nullptr, [&textConfig](MessageParcel &parcel) {
|
||||
return ITypesUtil::Unmarshal(parcel, textConfig);
|
||||
});
|
||||
@ -121,14 +109,12 @@ int32_t InputDataChannelProxy::GetTextConfig(TextTotalConfig &textConfig)
|
||||
|
||||
int32_t InputDataChannelProxy::SelectByRange(int32_t start, int32_t end)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
SELECT_BY_RANGE, [start, end](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, start, end); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::SelectByMovement(int32_t direction, int32_t cursorMoveSkip)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(SELECT_BY_MOVEMENT, [direction, cursorMoveSkip](MessageParcel &parcel) {
|
||||
return ITypesUtil::Marshal(parcel, direction, cursorMoveSkip);
|
||||
});
|
||||
@ -136,14 +122,13 @@ int32_t InputDataChannelProxy::SelectByMovement(int32_t direction, int32_t curso
|
||||
|
||||
int32_t InputDataChannelProxy::HandleExtendAction(int32_t action)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
return SendRequest(
|
||||
HANDLE_EXTEND_ACTION, [action](MessageParcel &parcel) { return ITypesUtil::Marshal(parcel, action); });
|
||||
}
|
||||
|
||||
int32_t InputDataChannelProxy::SendRequest(int code, ParcelHandler input, ParcelHandler output)
|
||||
{
|
||||
IMSA_HILOGD("InputDataChannelProxy run in");
|
||||
IMSA_HILOGI("InputDataChannelProxy run in, code = %{public}d", code);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option{ MessageOption::TF_SYNC };
|
||||
@ -157,7 +142,7 @@ int32_t InputDataChannelProxy::SendRequest(int code, ParcelHandler input, Parcel
|
||||
}
|
||||
auto ret = Remote()->SendRequest(code, data, reply, option);
|
||||
if (ret != NO_ERROR) {
|
||||
IMSA_HILOGE("InputDataChannelProxy SendRequest failed, ret %{public}d", ret);
|
||||
IMSA_HILOGE("InputDataChannelProxy send request failed, code: %{public}d ret %{public}d", code, ret);
|
||||
return ret;
|
||||
}
|
||||
ret = reply.ReadInt32();
|
||||
|
@ -39,7 +39,6 @@ int32_t InputMethodSystemAbilityProxy::PrepareInput(InputClientInfo &inputClient
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::StartInput(sptr<IInputClient> client, bool isShowKeyboard, bool attachFlag)
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::START_INPUT),
|
||||
[isShowKeyboard, client, attachFlag](MessageParcel &data) {
|
||||
return data.WriteRemoteObject(client->AsObject()) && data.WriteBool(isShowKeyboard) &&
|
||||
@ -49,25 +48,21 @@ int32_t InputMethodSystemAbilityProxy::StartInput(sptr<IInputClient> client, boo
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::ShowCurrentInput()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::SHOW_CURRENT_INPUT));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::HideCurrentInput()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::HIDE_CURRENT_INPUT));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::StopInputSession()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::STOP_INPUT_SESSION));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::StopInput(sptr<IInputClient> client)
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::STOP_INPUT), [client](MessageParcel &data) {
|
||||
return data.WriteRemoteObject(client->AsObject());
|
||||
});
|
||||
@ -82,14 +77,12 @@ int32_t InputMethodSystemAbilityProxy::ReleaseInput(sptr<IInputClient> client)
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::DisplayOptionalInputMethod()
|
||||
{
|
||||
IMSA_HILOGI("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_METHOD));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::SetCoreAndAgent(
|
||||
const sptr<IInputMethodCore> &core, const sptr<IInputMethodAgent> &agent)
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(
|
||||
static_cast<uint32_t>(InputMethodInterfaceCode::SET_CORE_AND_AGENT), [core, agent](MessageParcel &data) {
|
||||
return data.WriteRemoteObject(core->AsObject()) && data.WriteRemoteObject(agent->AsObject());
|
||||
@ -98,7 +91,6 @@ int32_t InputMethodSystemAbilityProxy::SetCoreAndAgent(
|
||||
|
||||
std::shared_ptr<Property> InputMethodSystemAbilityProxy::GetCurrentInputMethod()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
std::shared_ptr<Property> property = nullptr;
|
||||
int32_t ret = SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD), nullptr,
|
||||
[&property](MessageParcel &reply) {
|
||||
@ -110,7 +102,6 @@ std::shared_ptr<Property> InputMethodSystemAbilityProxy::GetCurrentInputMethod()
|
||||
|
||||
std::shared_ptr<SubProperty> InputMethodSystemAbilityProxy::GetCurrentInputMethodSubtype()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
std::shared_ptr<SubProperty> property = nullptr;
|
||||
int32_t ret = SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::GET_CURRENT_INPUT_METHOD_SUBTYPE),
|
||||
nullptr, [&property](MessageParcel &reply) {
|
||||
@ -122,7 +113,6 @@ std::shared_ptr<SubProperty> InputMethodSystemAbilityProxy::GetCurrentInputMetho
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::ListInputMethod(InputMethodStatus status, std::vector<Property> &props)
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(
|
||||
static_cast<uint32_t>(InputMethodInterfaceCode::LIST_INPUT_METHOD),
|
||||
[status](MessageParcel &data) {
|
||||
@ -135,26 +125,22 @@ int32_t InputMethodSystemAbilityProxy::ListInputMethod(InputMethodStatus status,
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::ShowCurrentInputDeprecated()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::SHOW_CURRENT_INPUT_DEPRECATED));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::HideCurrentInputDeprecated()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::HIDE_CURRENT_INPUT_DEPRECATED));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::DisplayOptionalInputMethodDeprecated()
|
||||
{
|
||||
IMSA_HILOGD("%{public}s in", __func__);
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::DISPLAY_OPTIONAL_INPUT_DEPRECATED));
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::ListInputMethodSubtype(
|
||||
const std::string &name, std::vector<SubProperty> &subProps)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy::ListInputMethodSubtype");
|
||||
return SendRequest(
|
||||
static_cast<uint32_t>(InputMethodInterfaceCode::LIST_INPUT_METHOD_SUBTYPE),
|
||||
[&name](MessageParcel &data) {
|
||||
@ -167,7 +153,6 @@ int32_t InputMethodSystemAbilityProxy::ListInputMethodSubtype(
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::ListCurrentInputMethodSubtype(std::vector<SubProperty> &subProps)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy::ListCurrentInputMethodSubtype");
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::LIST_CURRENT_INPUT_METHOD_SUBTYPE), nullptr,
|
||||
[&subProps](MessageParcel &reply) {
|
||||
return ITypesUtil::Unmarshal(reply, subProps);
|
||||
@ -176,7 +161,6 @@ int32_t InputMethodSystemAbilityProxy::ListCurrentInputMethodSubtype(std::vector
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::SwitchInputMethod(const std::string &name, const std::string &subName)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy::SwitchInputMethod");
|
||||
return SendRequest(
|
||||
static_cast<uint32_t>(InputMethodInterfaceCode::SWITCH_INPUT_METHOD), [&name, &subName](MessageParcel &data) {
|
||||
return ITypesUtil::Marshal(data, name, subName);
|
||||
@ -186,7 +170,6 @@ int32_t InputMethodSystemAbilityProxy::SwitchInputMethod(const std::string &name
|
||||
int32_t InputMethodSystemAbilityProxy::PanelStatusChange(
|
||||
const InputWindowStatus &status, const InputWindowInfo &windowInfo)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy::PanelStatusChange");
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::PANEL_STATUS_CHANGE),
|
||||
[status, windowInfo](MessageParcel &data) {
|
||||
return ITypesUtil::Marshal(data, static_cast<uint32_t>(status), windowInfo);
|
||||
@ -195,7 +178,6 @@ int32_t InputMethodSystemAbilityProxy::PanelStatusChange(
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::UpdateListenEventFlag(InputClientInfo &clientInfo, EventType eventType)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy::UpdateListenEventFlag");
|
||||
return SendRequest(static_cast<uint32_t>(InputMethodInterfaceCode::UPDATE_LISTEN_EVENT_FLAG),
|
||||
[&clientInfo, eventType](MessageParcel &data) {
|
||||
return ITypesUtil::Marshal(data, clientInfo, eventType);
|
||||
@ -212,7 +194,7 @@ bool InputMethodSystemAbilityProxy::IsCurrentIme()
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::SendRequest(int code, ParcelHandler input, ParcelHandler output)
|
||||
{
|
||||
IMSA_HILOGD("InputMethodSystemAbilityProxy run in, code = %{public}d", code);
|
||||
IMSA_HILOGI("InputMethodSystemAbilityProxy run in, code = %{public}d", code);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option{ MessageOption::TF_SYNC };
|
||||
|
@ -36,7 +36,7 @@ InputControlChannelStub::~InputControlChannelStub()
|
||||
int32_t InputControlChannelStub::OnRemoteRequest(
|
||||
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
IMSA_HILOGD("InputControlChannelStub, code = %{public}u, callingPid:%{public}d, callingUid:%{public}d", code,
|
||||
IMSA_HILOGI("InputControlChannelStub, code = %{public}u, callingPid: %{public}d, callingUid: %{public}d", code,
|
||||
IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
auto descriptorToken = data.ReadInterfaceToken();
|
||||
if (descriptorToken != GetDescriptor()) {
|
||||
@ -56,8 +56,7 @@ int32_t InputControlChannelStub::OnRemoteRequest(
|
||||
|
||||
int32_t InputControlChannelStub::HideKeyboardSelf()
|
||||
{
|
||||
IMSA_HILOGI("InputControlChannelStub run in.");
|
||||
Message *msg = new (std::nothrow) Message(MessageID::MSG_ID_HIDE_KEYBOARD_SELF, nullptr);
|
||||
auto msg = new (std::nothrow) Message(MessageID::MSG_ID_HIDE_KEYBOARD_SELF, nullptr);
|
||||
if (msg == nullptr) {
|
||||
return ErrorCode::ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ namespace MiscServices {
|
||||
int32_t InputMethodSystemAbilityStub::OnRemoteRequest(
|
||||
uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
IMSA_HILOGI("InputMethodSystemAbilityStub, code = %{public}u, callingPid:%{public}d, callingUid:%{public}d", code,
|
||||
IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
IMSA_HILOGI("InputMethodSystemAbilityStub, code = %{public}u, callingPid: %{public}d, callingUid: %{public}d",
|
||||
code, IPCSkeleton::GetCallingPid(), IPCSkeleton::GetCallingUid());
|
||||
std::u16string remoteDescriptor = data.ReadInterfaceToken();
|
||||
if (remoteDescriptor != IInputMethodSystemAbility::GetDescriptor()) {
|
||||
IMSA_HILOGE("%{public}s descriptor failed", __func__);
|
||||
|
Loading…
Reference in New Issue
Block a user