Signed-off-by: lovechinamo <wangdongqi2@huawei.com>

Changes to be committed:
This commit is contained in:
lovechinamo
2022-06-02 09:22:25 +08:00
parent 3361e6cd2b
commit 4c4a7be473
15 changed files with 34 additions and 34 deletions
@@ -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();
@@ -308,7 +308,7 @@ namespace MiscServices {
if (code) {
return code;
}
retHeight = reply.ReadInt32();
*retHeight = reply.ReadInt32();
return ErrorCode::NO_ERROR;
}
} // namespace MiscServices
@@ -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;
@@ -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;
@@ -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;
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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();
+5 -5
View File
@@ -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;
@@ -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);
+1 -1
View File
@@ -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);
+6 -6
View File
@@ -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;