fix warning

Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
zhouyongfei
2021-09-23 20:57:43 +08:00
parent 4905aca179
commit a8eee40e32
75 changed files with 3307 additions and 3247 deletions
+27 -17
View File
@@ -24,22 +24,19 @@
#include <string>
#include <stdint.h>
/*! \class PlatformApiProxy
\brief The proxy implementation of IPlatformApi
\todo This class will be deleted on target platform
*/
namespace OHOS {
namespace MiscServices {
class PlatformApi : public IRemoteProxy < IPlatformApi > {
class PlatformApiProxy : public IRemoteProxy < IPlatformApi > {
public:
PlatformApi(const sptr < IRemoteObject >& impl)
PlatformApiProxy(const sptr<IRemoteObject>& impl)
: IRemoteProxy < IPlatformApi >(impl)
{
}
~PlatformApi()
~PlatformApiProxy()
{
}
@@ -60,11 +57,13 @@ namespace MiscServices {
return ErrorCode::NO_ERROR;
}
std::u16string getInterfaceDescriptor() {
std::u16string getInterfaceDescriptor()
{
return Utils::to_utf16("20210814");
}
sptr < IInputMethodCore > bindInputMethodService(const std::u16string& packageName, const std::u16string& intention, int userId)
sptr < IInputMethodCore > bindInputMethodService(const std::u16string& packageName,
const std::u16string& intention, int userId)
{
MessageParcel data, reply;
MessageOption option;
@@ -138,12 +137,14 @@ namespace MiscServices {
return status;
}
int code = reply.ReadException();
if (code != 0) // code=0, means no exception.
if (code != 0) {
// code=0, means no exception.
return code;
}
return ErrorCode::NO_ERROR;
}
int32_t listInputMethod(int userId, std::vector < InputMethodProperty* > * inputMethodProperties)
int32_t listInputMethod(int userId, std::vector<InputMethodProperty*> *inputMethodProperties)
{
MessageParcel data, reply;
MessageOption option;
@@ -154,11 +155,13 @@ namespace MiscServices {
return status;
}
int code = reply.ReadException();
if (code != 0) // code=0, means no exception.
if (code != 0) {
// code=0, means no exception.
return code;
}
int size = reply.ReadInt32();
for (int i = 0; i < size; i++) {
InputMethodProperty * property = new InputMethodProperty();
InputMethodProperty *property = new InputMethodProperty();
property = reply.ReadParcelable<InputMethodProperty>();
inputMethodProperties->push_back(property);
}
@@ -166,7 +169,8 @@ namespace MiscServices {
}
virtual int32_t getInputMethodProperty(int userId, const std::u16string& packageName, InputMethodProperty * inputMethodProperty)
virtual int32_t getInputMethodProperty(int userId, const std::u16string& packageName,
InputMethodProperty *inputMethodProperty)
{
MessageParcel data, reply;
MessageOption option;
@@ -178,13 +182,15 @@ namespace MiscServices {
return status;
}
int code = reply.ReadException();
if (code != 0) // code=0, means no exception.
if (code != 0) {
// code=0, means no exception.
return code;
}
inputMethodProperty = reply.ReadParcelable<InputMethodProperty>();
return status;
}
int32_t getInputMethodSetting(int userId, InputMethodSetting * inputMethodSetting)
int32_t getInputMethodSetting(int userId, InputMethodSetting *inputMethodSetting)
{
MessageParcel data, reply;
MessageOption option;
@@ -195,8 +201,10 @@ namespace MiscServices {
return status;
}
int code = reply.ReadException();
if (code != 0) // code=0, means no exception.
if (code != 0) {
// code=0, means no exception.
return code;
}
inputMethodSetting = reply.ReadParcelable<InputMethodSetting>();
return status;
}
@@ -213,8 +221,10 @@ namespace MiscServices {
return status;
}
int code = reply.ReadException();
if (code != 0) // code=0, means no exception.
if (code != 0) {
// code=0, means no exception.
return code;
}
return ErrorCode::NO_ERROR;
}
};