mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-28 09:20:27 +00:00
add ime check for getInputMethodAbility
Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
parent
0ac759f8b1
commit
c5a52dd7d5
@ -137,7 +137,7 @@ napi_value JsInputMethodEngineSetting::JsConstructor(napi_env env, napi_callback
|
||||
napi_value thisVar = nullptr;
|
||||
NAPI_CALL(env, napi_get_cb_info(env, cbinfo, nullptr, nullptr, &thisVar, nullptr));
|
||||
auto setting = GetInputMethodEngineSetting();
|
||||
if (setting == nullptr || InitInputMethodSetting()) {
|
||||
if (setting == nullptr || !InitInputMethodSetting()) {
|
||||
IMSA_HILOGE("failed to get setting");
|
||||
napi_value result = nullptr;
|
||||
napi_get_null(env, &result);
|
||||
|
@ -117,8 +117,8 @@ napi_value JsKeyboardDelegateSetting::JsConstructor(napi_env env, napi_callback_
|
||||
napi_value thisVar = nullptr;
|
||||
NAPI_CALL(env, napi_get_cb_info(env, cbinfo, nullptr, nullptr, &thisVar, nullptr));
|
||||
auto delegate = GetKeyboardDelegateSetting();
|
||||
if (delegate == nullptr || InitKeyboardDelegate()) {
|
||||
IMSA_HILOGE("get delegate nullptr");
|
||||
if (delegate == nullptr || !InitKeyboardDelegate()) {
|
||||
IMSA_HILOGE("failed to get delegate");
|
||||
napi_value result = nullptr;
|
||||
napi_get_null(env, &result);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user