!17 合入输入法多前台调用的修改

Merge pull request !17 from demon/master
This commit is contained in:
openharmony_ci 2021-11-02 08:00:36 +00:00 committed by Gitee
commit 69ab2b5f61
2 changed files with 5 additions and 3 deletions

View File

@ -213,8 +213,8 @@ namespace MiscServices {
*/
extern "C" __attribute__((constructor)) void RegisterModule()
{
IMSA_HILOGI("RegisterModule() is called!");
napi_module_register(&inputMethodEngineModule);
IMSA_HILOGI("RegisterModule() is called!");
napi_module_register(&inputMethodEngineModule);
}
}
}

View File

@ -1182,7 +1182,9 @@ namespace MiscServices {
want.SetElementName("com.example.kikakeyboard", "com.example.kikakeyboard.MainAbility");
sptr<InputMethodAbilityConnectionStub> stub(new (std::nothrow) InputMethodAbilityConnectionStub(0));
sptr<AAFwk::AbilityConnectionProxy> connCallback = new (std::nothrow) AAFwk::AbilityConnectionProxy(stub);
GetAbilityManagerService()->StartAbility(want);
std::shared_ptr<AAFwk::AbilityStartSetting> setting = AAFwk::AbilityStartSetting::GetEmptySetting();
setting->AddProperty(AAFwk::AbilityStartSetting::WINDOW_MODE_KEY, std::to_string(AAFwk::AbilityWindowConfiguration::MULTI_WINDOW_DISPLAY_FLOATING));
GetAbilityManagerService()->StartAbility(want, *setting, nullptr, -1);
}
sptr<AAFwk::IAbilityManager> PerUserSession::GetAbilityManagerService()