modify switch

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2023-05-18 22:17:59 +08:00
parent 0234da8eef
commit 7e2f5ff280

View File

@ -60,6 +60,7 @@ bool FuzzPerUserSession(const uint8_t *rawData, size_t size)
std::shared_ptr<PerUserSession> userSessions = std::make_shared<PerUserSession>(MAIN_USER_ID);
sptr<IInputMethodCore> core = new InputMethodCoreProxy(object);
sptr<IInputMethodAgent> agent = new InputMethodAgentProxy(object);
ImeCache cache = { .core = core, .agent = agent };
InputMethodInfo *ime = new InputMethodInfo();
userSessions->OnShowKeyboardSelf();
@ -70,7 +71,7 @@ bool FuzzPerUserSession(const uint8_t *rawData, size_t size)
userSessions->OnStartInput(client, isShowKeyboard);
userSessions->OnStopInput(client);
userSessions->OnReleaseInput(client);
userSessions->OnSetCoreAndAgent(core, agent);
userSessions->OnSetCoreAndAgent(std::make_shared<ImeCache>(cache));
delete ime;
ime = nullptr;