Signed-off-by: caochunlei <caochunlei1@huawei.com>
This commit is contained in:
caochunlei
2022-01-25 12:24:24 +00:00
parent a0466e169a
commit 3f24830803
2 changed files with 6 additions and 5 deletions
@@ -37,7 +37,7 @@ namespace MiscServices {
void setInputMethodCoreFromHap(MessageParcel& data);
protected:
int32_t getUserId(int32_t uid);
int USER_ID_CHANGE_VALUE = 1000000;
int USER_ID_CHANGE_VALUE = 200000; // user range
};
}
}
+5 -4
View File
@@ -26,6 +26,7 @@ namespace MiscServices {
using namespace MessageID;
REGISTER_SYSTEM_ABILITY_BY_ID(InputMethodSystemAbility, INPUT_METHOD_SYSTEM_ABILITY_ID, true);
const std::int32_t INIT_INTERVAL = 10000L;
const std::int32_t MAIN_USER_ID = 100;
std::mutex InputMethodSystemAbility::instanceLock_;
sptr<InputMethodSystemAbility> InputMethodSystemAbility::instance_;
@@ -162,10 +163,10 @@ namespace MiscServices {
workThreadHandler = std::thread([this] {
WorkThread();
});
PerUserSetting *setting = new PerUserSetting(0);
PerUserSession *session = new PerUserSession(0);
userSettings.insert(std::pair<int32_t, PerUserSetting*>(0, setting));
userSessions.insert(std::pair<int32_t, PerUserSession*>(0, session));
PerUserSetting *setting = new PerUserSetting(MAIN_USER_ID);
PerUserSession *session = new PerUserSession(MAIN_USER_ID);
userSettings.insert(std::pair<int32_t, PerUserSetting*>(MAIN_USER_ID, setting));
userSessions.insert(std::pair<int32_t, PerUserSession*>(MAIN_USER_ID, session));
setting->Initialize();
}