Signed-off-by: yangliu <yangliu146@huawei.com>
This commit is contained in:
yangliu 2022-07-26 14:41:55 +08:00
parent 1ee6fed05a
commit 30a04d4443
5 changed files with 5 additions and 6 deletions

View File

@ -17,9 +17,9 @@
#include "global.h"
namespace OHOS {
namespace MiscServices {
ContextBase::~ContextBase()
{
}
napi_status ContextBase::GetNative(napi_env envi, napi_callback_info info)

View File

@ -55,7 +55,7 @@ void JsGetInputMethodController::CBOrPromiseStopInput(napi_env env,
}
}
napi_value JsGetInputMethodController::Init(napi_env env, napi_value info)
napi_value JsGetInputMethodController::Init(napi_env env, napi_value info)
{
napi_property_descriptor descriptor[] = {
DECLARE_NAPI_FUNCTION("getInputMethodController", GetInputMethodController),

View File

@ -24,7 +24,7 @@
namespace OHOS {
namespace MiscServices {
struct StopInputContext : public ContextBase {
bool sStopInput = false;
bool sStopInput = false;
napi_status status = napi_generic_failure;
};
class JsGetInputMethodController {

View File

@ -89,7 +89,6 @@ void JsGetInputMethodSetting::GetResult(napi_env env, std::vector<InputMethodPro
uint32_t index = 0;
for (const auto &item : properties) {
if (item == nullptr) {
IMSA_HILOGE("GetResult::item is null");
continue;

View File

@ -25,7 +25,7 @@ namespace OHOS {
namespace MiscServices {
thread_local napi_ref JsInputMethod::IMSRef_ = nullptr;
const std::string JsInputMethod::IMS_CLASS_NAME = "InputMethod";
napi_value JsInputMethod::Init(napi_env env, napi_value exports)
napi_value JsInputMethod::Init(napi_env env, napi_value exports)
{
napi_property_descriptor descriptor[] = {
DECLARE_NAPI_FUNCTION("switchInputMethod", SwitchInputMethod),
@ -69,7 +69,7 @@ napi_value JsInputMethod::JsConstructor(napi_env env, napi_callback_info cbinfo)
void JsInputMethod::CallbackOrPromiseSwitchInput(
napi_env env, const SwitchInputMethodContext *switchInput, napi_value err, napi_value data)
{
{
IMSA_HILOGI("run in CallbackOrPromiseSwitchInput");
napi_value args[RESULT_COUNT] = {err, data};
if (switchInput->deferred) {