!93 修改崩溃

Merge pull request !93 from demon/master
This commit is contained in:
openharmony_ci 2022-03-11 08:31:32 +00:00 committed by Gitee
commit 886de6b825
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 3 deletions

View File

@ -22,7 +22,6 @@
#include "js_input_method_setting.h" #include "js_input_method_setting.h"
namespace OHOS { namespace OHOS {
namespace MiscServices { namespace MiscServices {
// class JsInputMethodSetting;
NativeValue *CreateInputMethodSetting(NativeEngine& engine); NativeValue *CreateInputMethodSetting(NativeEngine& engine);
NativeValue *CreateInputMethodController(NativeEngine& engine); NativeValue *CreateInputMethodController(NativeEngine& engine);
} }

View File

@ -1221,7 +1221,9 @@ namespace MiscServices {
sptr<InputClientProxy> client = new InputClientProxy(clientObject); sptr<InputClientProxy> client = new InputClientProxy(clientObject);
sptr<IInputClient> interface = client; sptr<IInputClient> interface = client;
int remainClientNum = 0; int remainClientNum = 0;
imsCore[0]->SetClientState(false); if (imsCore[0] != nullptr) {
imsCore[0]->SetClientState(false);
}
HideKeyboard(client); HideKeyboard(client);
int ret = RemoveClient(client, remainClientNum); int ret = RemoveClient(client, remainClientNum);
if (ret != ErrorCode::NO_ERROR) { if (ret != ErrorCode::NO_ERROR) {
@ -1241,7 +1243,9 @@ namespace MiscServices {
MessageParcel *data = msg->msgContent_; MessageParcel *data = msg->msgContent_;
sptr<IRemoteObject> clientObject = data->ReadRemoteObject(); sptr<IRemoteObject> clientObject = data->ReadRemoteObject();
sptr<InputClientProxy> client = new InputClientProxy(clientObject); sptr<InputClientProxy> client = new InputClientProxy(clientObject);
imsCore[0]->SetClientState(true); if (imsCore[0] != nullptr) {
imsCore[0]->SetClientState(true);
}
ShowKeyboard(client); ShowKeyboard(client);
} }