mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2025-03-09 02:01:25 +00:00
Signed-off-by: lovechinamo <wangdongqi2@huawei.com>
Changes to be committed:
This commit is contained in:
parent
5793d1907a
commit
44bcfeddf2
@ -56,7 +56,7 @@ namespace MiscServices {
|
||||
virtual bool showKeyboard(const sptr<IInputDataChannel>& inputDataChannel) = 0;
|
||||
virtual bool hideKeyboard(int32_t flags) = 0;
|
||||
virtual int32_t setKeyboardType(const KeyboardType& type) = 0;
|
||||
virtual int32_t getKeyboardWindowHeight(int32_t *retHeight) = 0;
|
||||
virtual int32_t getKeyboardWindowHeight(int32_t &retHeight) = 0;
|
||||
virtual int32_t InitInputControlChannel(sptr<IInputControlChannel> &inputControlChannel) = 0;
|
||||
virtual void SetClientState(bool state) = 0;
|
||||
virtual void StopInputService(std::string imeId) = 0;
|
||||
|
@ -43,7 +43,7 @@ namespace MiscServices {
|
||||
bool showKeyboard(const sptr<IInputDataChannel>& inputDataChannel) override;
|
||||
bool hideKeyboard(int32_t flags) override;
|
||||
int32_t setKeyboardType(const KeyboardType& type) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t *retHeight) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t &retHeight) override;
|
||||
int32_t InitInputControlChannel(sptr<IInputControlChannel> &inputControlChannel) override;
|
||||
void SetClientState(bool state) override;
|
||||
void StopInputService(std::string imeId) override;
|
||||
|
@ -52,7 +52,7 @@ namespace MiscServices {
|
||||
bool showKeyboard(const sptr<IInputDataChannel>& inputDataChannel) override;
|
||||
bool hideKeyboard(int32_t flags)override;
|
||||
int32_t setKeyboardType(const KeyboardType& type) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t *retHeight) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t &retHeight) override;
|
||||
int32_t InitInputControlChannel(sptr<IInputControlChannel> &inputControlChannel) override;
|
||||
void SetClientState(bool state) override;
|
||||
void StopInputService(std::string imeId) override;
|
||||
|
@ -287,7 +287,7 @@ namespace MiscServices {
|
||||
return code;
|
||||
}
|
||||
|
||||
int32_t InputMethodCoreProxy::getKeyboardWindowHeight(int32_t *retHeight)
|
||||
int32_t InputMethodCoreProxy::getKeyboardWindowHeight(int32_t &retHeight)
|
||||
{
|
||||
IMSA_HILOGI("InputMethodCoreProxy::getKeyboardWindowHeight");
|
||||
auto remote = Remote();
|
||||
|
@ -127,7 +127,7 @@ namespace MiscServices {
|
||||
}
|
||||
case GET_KEYBOARD_WINDOW_HEIGHT: {
|
||||
int32_t retHeight = 0;
|
||||
getKeyboardWindowHeight(&retHeight);
|
||||
getKeyboardWindowHeight(retHeight);
|
||||
reply.WriteNoException();
|
||||
break;
|
||||
}
|
||||
@ -287,7 +287,7 @@ namespace MiscServices {
|
||||
msgHandler_->SendMessage(msg);
|
||||
}
|
||||
|
||||
int32_t InputMethodCoreStub::getKeyboardWindowHeight(int32_t *retHeight)
|
||||
int32_t InputMethodCoreStub::getKeyboardWindowHeight(int32_t &retHeight)
|
||||
{
|
||||
IMSA_HILOGI("InputMethodCoreStub::getKeyboardWindowHeight");
|
||||
if (!msgHandler_) {
|
||||
|
@ -50,8 +50,8 @@ namespace MiscServices {
|
||||
int32_t Stop(sptr<InputClientStub> &client);
|
||||
|
||||
void displayOptionalInputMethod(MessageParcel& data) override;
|
||||
int32_t getDisplayMode(int32_t *retMode) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t *retHeight) override;
|
||||
int32_t getDisplayMode(int32_t &retMode) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t &retHeight) override;
|
||||
int32_t getCurrentKeyboardType(KeyboardType *retType) override;
|
||||
int32_t listInputMethodEnabled(std::vector<InputMethodProperty*> *properties) override;
|
||||
int32_t listInputMethod(std::vector<InputMethodProperty*> *properties) override;
|
||||
|
@ -255,7 +255,7 @@ namespace MiscServices {
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::getDisplayMode(int32_t *retMode)
|
||||
int32_t InputMethodSystemAbilityProxy::getDisplayMode(int32_t &retMode)
|
||||
{
|
||||
MessageParcel data, reply;
|
||||
MessageOption option;
|
||||
@ -280,7 +280,7 @@ namespace MiscServices {
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
int32_t InputMethodSystemAbilityProxy::getKeyboardWindowHeight(int32_t *retHeight)
|
||||
int32_t InputMethodSystemAbilityProxy::getKeyboardWindowHeight(int32_t &retHeight)
|
||||
{
|
||||
MessageParcel data, reply;
|
||||
MessageOption option;
|
||||
|
@ -59,8 +59,8 @@ namespace MiscServices {
|
||||
virtual void HideCurrentInput(MessageParcel& data) = 0;
|
||||
|
||||
virtual void displayOptionalInputMethod(MessageParcel& data) = 0;
|
||||
virtual int32_t getDisplayMode(int32_t *retMode) = 0;
|
||||
virtual int32_t getKeyboardWindowHeight(int32_t *retHeight) = 0;
|
||||
virtual int32_t getDisplayMode(int32_t &retMode) = 0;
|
||||
virtual int32_t getKeyboardWindowHeight(int32_t &retHeight) = 0;
|
||||
virtual int32_t getCurrentKeyboardType(KeyboardType *retType) = 0;
|
||||
virtual int32_t listInputMethodEnabled(std::vector<InputMethodProperty*> *properties) = 0;
|
||||
virtual int32_t listInputMethod(std::vector<InputMethodProperty*> *properties) = 0;
|
||||
|
@ -47,8 +47,8 @@ namespace MiscServices {
|
||||
|
||||
int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
|
||||
MessageOption &option) override;
|
||||
int32_t getDisplayMode(int32_t *retMode) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t *retHeight) override;
|
||||
int32_t getDisplayMode(int32_t &retMode) override;
|
||||
int32_t getKeyboardWindowHeight(int32_t &retHeight) override;
|
||||
int32_t getCurrentKeyboardType(KeyboardType *retType) override;
|
||||
int32_t listInputMethodEnabled(std::vector<InputMethodProperty*> *properties) override;
|
||||
int32_t listInputMethod(std::vector<InputMethodProperty*> *properties) override;
|
||||
|
@ -107,7 +107,7 @@ namespace MiscServices {
|
||||
void OnPackageRemoved(const std::u16string& packageName);
|
||||
|
||||
int GetDisplayMode();
|
||||
int GetKeyboardWindowHeight(int *retHeight);
|
||||
int GetKeyboardWindowHeight(int &retHeight);
|
||||
KeyboardType *GetCurrentKeyboardType();
|
||||
|
||||
int OnSettingChanged(const std::u16string& key, const std::u16string& value);
|
||||
|
@ -39,8 +39,8 @@ namespace MiscServices {
|
||||
InputMethodSetting *GetInputMethodSetting();
|
||||
InputMethodProperty *GetInputMethodProperty(const std::u16string& imeId);
|
||||
|
||||
int32_t OnPackageAdded(std::u16string& packageName, bool *isSecurityIme);
|
||||
int32_t OnPackageRemoved(std::u16string& packageName, bool *isSecurityIme);
|
||||
int32_t OnPackageAdded(std::u16string& packageName, bool &isSecurityIme);
|
||||
int32_t OnPackageRemoved(std::u16string& packageName, bool &isSecurityIme);
|
||||
int32_t OnSettingChanged(const std::u16string& key, const std::u16string& value);
|
||||
void OnAdvanceToNext();
|
||||
void OnUserLocked();
|
||||
|
@ -214,8 +214,6 @@ namespace MiscServices {
|
||||
session->CreateWorkThread(*handler);
|
||||
msgHandlers.insert(std::pair<int32_t, MessageHandler*>(MAIN_USER_ID, handler));
|
||||
}
|
||||
delete handler;
|
||||
handler = nullptr;
|
||||
}
|
||||
|
||||
bool isStartSuccess = false;
|
||||
@ -287,7 +285,7 @@ namespace MiscServices {
|
||||
\return ErrorCode::NO_ERROR no error
|
||||
\return ErrorCode::ERROR_USER_NOT_UNLOCKED user not unlocked
|
||||
*/
|
||||
int32_t InputMethodSystemAbility::getDisplayMode(int32_t *retMode)
|
||||
int32_t InputMethodSystemAbility::getDisplayMode(int32_t &retMode)
|
||||
{
|
||||
int32_t uid = IPCSkeleton::GetCallingUid();
|
||||
int32_t userId = getUserId(uid);
|
||||
@ -311,7 +309,7 @@ namespace MiscServices {
|
||||
\return ErrorCode::NO_ERROR no error
|
||||
\return ErrorCode::ERROR_USER_NOT_UNLOCKED user not unlocked
|
||||
*/
|
||||
int32_t InputMethodSystemAbility::getKeyboardWindowHeight(int32_t *retHeight)
|
||||
int32_t InputMethodSystemAbility::getKeyboardWindowHeight(int32_t &retHeight)
|
||||
{
|
||||
int32_t uid = IPCSkeleton::GetCallingUid();
|
||||
int32_t userId = getUserId(uid);
|
||||
@ -772,7 +770,7 @@ namespace MiscServices {
|
||||
return ErrorCode::ERROR_USER_NOT_UNLOCKED;
|
||||
}
|
||||
bool securityImeFlag = false;
|
||||
int32_t ret = setting->OnPackageAdded(packageName, &securityImeFlag);
|
||||
int32_t ret = setting->OnPackageAdded(packageName, securityImeFlag);
|
||||
if (ret != ErrorCode::NO_ERROR) {
|
||||
IMSA_HILOGI("End...\n");
|
||||
return ret;
|
||||
@ -826,7 +824,7 @@ namespace MiscServices {
|
||||
}
|
||||
session->OnPackageRemoved(packageName);
|
||||
bool securityImeFlag = false;
|
||||
int32_t ret = setting->OnPackageRemoved(packageName, &securityImeFlag);
|
||||
int32_t ret = setting->OnPackageRemoved(packageName, securityImeFlag);
|
||||
if (ret != ErrorCode::NO_ERROR) {
|
||||
IMSA_HILOGI("End...\n");
|
||||
return ret;
|
||||
|
@ -69,7 +69,7 @@ namespace MiscServices {
|
||||
}
|
||||
case GET_DISPLAY_MODE: {
|
||||
int32_t mode = 0;
|
||||
int32_t status = getDisplayMode(&mode);
|
||||
int32_t status = getDisplayMode(mode);
|
||||
if (status == ErrorCode::NO_ERROR) {
|
||||
reply.WriteInt32(NO_ERROR);
|
||||
reply.WriteInt32(mode);
|
||||
@ -81,7 +81,7 @@ namespace MiscServices {
|
||||
}
|
||||
case GET_KEYBOARD_WINDOW_HEIGHT: {
|
||||
int32_t height = 0;
|
||||
int32_t status = getKeyboardWindowHeight(&height);
|
||||
int32_t status = getKeyboardWindowHeight(height);
|
||||
if (status == ErrorCode::NO_ERROR) {
|
||||
reply.WriteInt32(NO_ERROR);
|
||||
reply.WriteInt32(height);
|
||||
|
@ -546,7 +546,7 @@ namespace MiscServices {
|
||||
\param[out] retHeight the height of keyboard window showing or showed returned to caller
|
||||
\return ErrorCode
|
||||
*/
|
||||
int PerUserSession::GetKeyboardWindowHeight(int *retHeight)
|
||||
int PerUserSession::GetKeyboardWindowHeight(int &retHeight)
|
||||
{
|
||||
if (imsCore[lastImeIndex]) {
|
||||
int ret = imsCore[lastImeIndex]->getKeyboardWindowHeight(retHeight);
|
||||
|
@ -76,7 +76,7 @@ namespace MiscServices {
|
||||
* ErrorCode::ERROR_NOT_IME_PACKAGE The installed package is not an IME package.
|
||||
* ErrorCode::ERROR_IME_PACKAGE_DUPLICATED The installed package is duplicated.
|
||||
*/
|
||||
int PerUserSetting::OnPackageAdded(std::u16string& packageName, bool *isSecurityIme)
|
||||
int PerUserSetting::OnPackageAdded(std::u16string& packageName, bool &isSecurityIme)
|
||||
{
|
||||
if (*isSecurityIme) {
|
||||
*isSecurityIme = false;
|
||||
@ -126,7 +126,7 @@ namespace MiscServices {
|
||||
* and is removed from the input method management system
|
||||
* ErrorCode::ERROR_NOT_IME_PACKAGE The removed package is not an IME package.
|
||||
*/
|
||||
int PerUserSetting::OnPackageRemoved(std::u16string& packageName, bool *isSecurityIme)
|
||||
int PerUserSetting::OnPackageRemoved(std::u16string& packageName, bool &isSecurityIme)
|
||||
{
|
||||
if (*isSecurityIme) {
|
||||
*isSecurityIme = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user