mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 14:49:59 +00:00
Merge branch 'master' of gitee.com:openharmony/inputmethod_imf into master
Signed-off-by: 赵凌岚 <zhaolinglan@huawei.com>
This commit is contained in:
commit
eeedc2f4c0
@ -161,8 +161,8 @@ const std::string JsUtils::ToMessage(int32_t code)
|
||||
return "error is out of definition.";
|
||||
}
|
||||
|
||||
bool JsUtils::TraverseCallback(
|
||||
std::vector<std::shared_ptr<JSCallbackObject>> &vecCopy, size_t paramNum, ArgsProvider argsProvider)
|
||||
bool JsUtils::TraverseCallback(const std::vector<std::shared_ptr<JSCallbackObject>> &vecCopy, size_t paramNum,
|
||||
ArgsProvider argsProvider)
|
||||
{
|
||||
bool isResult = false;
|
||||
bool isOnKeyEvent = false;
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
|
||||
static napi_value ToError(napi_env env, int32_t err);
|
||||
|
||||
static bool TraverseCallback(std::vector<std::shared_ptr<JSCallbackObject>> &vecCopy, size_t paramNum,
|
||||
static bool TraverseCallback(const std::vector<std::shared_ptr<JSCallbackObject>> &vecCopy, size_t paramNum,
|
||||
ArgsProvider argsProvider);
|
||||
|
||||
private:
|
||||
|
@ -167,7 +167,6 @@ void ImCommonEventManager::EventSubscriber::RemoveUser(const CommonEventData &da
|
||||
void ImCommonEventManager::EventSubscriber::RemovePackage(const CommonEventData &data)
|
||||
{
|
||||
auto const &want = data.GetWant();
|
||||
std::string action = want.GetAction();
|
||||
auto element = want.GetElement();
|
||||
std::string bundleName = element.GetBundleName();
|
||||
int32_t userId = want.GetIntParam("userId", 0);
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
@ -107,10 +108,10 @@ void ImeCfgManager::DeleteImeCfg(int32_t userId)
|
||||
ImeCfg ImeCfgManager::GetImeCfg(int32_t userId)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(imeCfgLock_);
|
||||
for (auto &cfg : imeConfigs_) {
|
||||
if (cfg.userId == userId) {
|
||||
return cfg;
|
||||
}
|
||||
auto it = std::find_if(
|
||||
imeConfigs_.begin(), imeConfigs_.end(), [userId](const ImeCfg &cfg) { return cfg.userId == userId; });
|
||||
if (it != imeConfigs_.end()) {
|
||||
return *it;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user