diff --git a/frameworks/inputmethod_ability/include/i_input_method_core.h b/frameworks/inputmethod_ability/include/i_input_method_core.h index 112aaac..b75bd43 100644 --- a/frameworks/inputmethod_ability/include/i_input_method_core.h +++ b/frameworks/inputmethod_ability/include/i_input_method_core.h @@ -56,7 +56,7 @@ namespace MiscServices { virtual bool showKeyboard(const sptr& 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 &inputControlChannel) = 0; virtual void SetClientState(bool state) = 0; virtual void StopInputService(std::string imeId) = 0; diff --git a/frameworks/inputmethod_ability/include/input_method_core_proxy.h b/frameworks/inputmethod_ability/include/input_method_core_proxy.h index eec719f..f49f968 100644 --- a/frameworks/inputmethod_ability/include/input_method_core_proxy.h +++ b/frameworks/inputmethod_ability/include/input_method_core_proxy.h @@ -43,7 +43,7 @@ namespace MiscServices { bool showKeyboard(const sptr& 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 &inputControlChannel) override; void SetClientState(bool state) override; void StopInputService(std::string imeId) override; diff --git a/frameworks/inputmethod_ability/include/input_method_core_stub.h b/frameworks/inputmethod_ability/include/input_method_core_stub.h index 0e68056..3d05c44 100644 --- a/frameworks/inputmethod_ability/include/input_method_core_stub.h +++ b/frameworks/inputmethod_ability/include/input_method_core_stub.h @@ -52,7 +52,7 @@ namespace MiscServices { bool showKeyboard(const sptr& 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 &inputControlChannel) override; void SetClientState(bool state) override; void StopInputService(std::string imeId) override; diff --git a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp index 1626863..f681f37 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_proxy.cpp @@ -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(); @@ -308,7 +308,7 @@ namespace MiscServices { if (code) { return code; } - retHeight = reply.ReadInt32(); + *retHeight = reply.ReadInt32(); return ErrorCode::NO_ERROR; } } // namespace MiscServices diff --git a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp index e117853..c35831d 100644 --- a/frameworks/inputmethod_ability/src/input_method_core_stub.cpp +++ b/frameworks/inputmethod_ability/src/input_method_core_stub.cpp @@ -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_) { diff --git a/frameworks/inputmethod_controller/include/input_method_system_ability_proxy.h b/frameworks/inputmethod_controller/include/input_method_system_ability_proxy.h index df30d91..b2f91d4 100644 --- a/frameworks/inputmethod_controller/include/input_method_system_ability_proxy.h +++ b/frameworks/inputmethod_controller/include/input_method_system_ability_proxy.h @@ -50,8 +50,8 @@ namespace MiscServices { int32_t Stop(sptr &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 *properties) override; int32_t listInputMethod(std::vector *properties) override; diff --git a/frameworks/inputmethod_controller/src/input_method_system_ability_proxy.cpp b/frameworks/inputmethod_controller/src/input_method_system_ability_proxy.cpp index c639b6a..8db268a 100644 --- a/frameworks/inputmethod_controller/src/input_method_system_ability_proxy.cpp +++ b/frameworks/inputmethod_controller/src/input_method_system_ability_proxy.cpp @@ -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; @@ -274,13 +274,13 @@ namespace MiscServices { return ret; } - if (!reply.ReadInt32(retMode)) { + if (!reply.ReadInt32(*retMode)) { return ERROR_STATUS_BAD_VALUE; } return NO_ERROR; } - int32_t InputMethodSystemAbilityProxy::getKeyboardWindowHeight(int32_t &retHeight) + int32_t InputMethodSystemAbilityProxy::getKeyboardWindowHeight(int32_t *retHeight) { MessageParcel data, reply; MessageOption option; @@ -299,7 +299,7 @@ namespace MiscServices { return ret; } - if (!reply.ReadInt32(retHeight)) { + if (!reply.ReadInt32(*retHeight)) { return ERROR_STATUS_BAD_VALUE; } return NO_ERROR; diff --git a/services/include/i_input_method_system_ability.h b/services/include/i_input_method_system_ability.h index 53ea3ef..cb613a8 100644 --- a/services/include/i_input_method_system_ability.h +++ b/services/include/i_input_method_system_ability.h @@ -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 *properties) = 0; virtual int32_t listInputMethod(std::vector *properties) = 0; diff --git a/services/include/input_method_system_ability.h b/services/include/input_method_system_ability.h index 784d2d4..e04eda7 100644 --- a/services/include/input_method_system_ability.h +++ b/services/include/input_method_system_ability.h @@ -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 *properties) override; int32_t listInputMethod(std::vector *properties) override; diff --git a/services/include/peruser_session.h b/services/include/peruser_session.h index 7d36c80..89a7fc8 100644 --- a/services/include/peruser_session.h +++ b/services/include/peruser_session.h @@ -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); diff --git a/services/include/peruser_setting.h b/services/include/peruser_setting.h index c69298c..c6eba1d 100644 --- a/services/include/peruser_setting.h +++ b/services/include/peruser_setting.h @@ -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(); diff --git a/services/src/input_method_system_ability.cpp b/services/src/input_method_system_ability.cpp index aa9ab40..7fac080 100644 --- a/services/src/input_method_system_ability.cpp +++ b/services/src/input_method_system_ability.cpp @@ -287,7 +287,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); @@ -301,7 +301,7 @@ namespace MiscServices { IMSA_HILOGI("InputMethodSystemAbility::getDisplayMode session is nullptr"); return ErrorCode::ERROR_NULL_POINTER; } - retMode = session->GetDisplayMode(); + *retMode = session->GetDisplayMode(); return ErrorCode::NO_ERROR; } @@ -311,7 +311,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 +772,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 +826,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; diff --git a/services/src/input_method_system_ability_stub.cpp b/services/src/input_method_system_ability_stub.cpp index 2dd37f0..0f50fab 100644 --- a/services/src/input_method_system_ability_stub.cpp +++ b/services/src/input_method_system_ability_stub.cpp @@ -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); diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index 1f87733..973b8c8 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -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); diff --git a/services/src/peruser_setting.cpp b/services/src/peruser_setting.cpp index 2fc1d64..a945e2e 100644 --- a/services/src/peruser_setting.cpp +++ b/services/src/peruser_setting.cpp @@ -76,10 +76,10 @@ 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; + if (*isSecurityIme) { + *isSecurityIme = false; } std::u16string imeId = GetImeId(packageName); if (imeId.size()) { @@ -97,8 +97,8 @@ namespace MiscServices { } inputMethodProperties.push_back(property); if (CheckIfSecurityIme(*property)) { - if (isSecurityIme) { - isSecurityIme = true; + if (*isSecurityIme) { + *isSecurityIme = true; } return ErrorCode::NO_ERROR; } @@ -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;