fix codex warning

Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
zhouyongfei
2021-09-22 15:59:51 +08:00
parent cc82dbf2ff
commit 6f1ed85e60
65 changed files with 2693 additions and 2785 deletions
@@ -18,88 +18,86 @@
namespace OHOS {
namespace MiscServices {
InputClientStub::InputClientStub()
{
InputClientStub::InputClientStub()
{
}
InputClientStub::~InputClientStub()
{
}
int32_t InputClientStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option)
{
IMSA_HILOGI("InputClientStub::OnRemoteRequest. code = %{public}u", code);
auto descriptorToken = data.ReadInterfaceToken();
if (descriptorToken != GetDescriptor()) {
return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION;
}
switch (code) {
case ON_INPUT_READY: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
if (data.ReadInt32() > 0) {
parcel->WriteRemoteObject(data.ReadRemoteObject());
}
if (data.ReadInt32() > 0) {
parcel->WriteParcelable(data.ReadParcelable<InputChannel>());
}
Message* msg = new Message(MessageID::MSG_ID_ON_INPUT_READY, parcel);
msgHandler->SendMessage(msg);
break;
}
case ON_INPUT_RELEASED: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
Message* msg = new Message(MessageID::MSG_ID_EXIT_SERVICE, parcel);
msgHandler->SendMessage(msg);
break;
}
case SET_DISPLAY_MODE: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
Message* msg = new Message(MessageID::MSG_ID_SET_DISPLAY_MODE, parcel);
msgHandler->SendMessage(msg);
break;
}
default:
return IPCObjectStub::OnRemoteRequest(code, data, reply, option);
InputClientStub::~InputClientStub()
{
}
return NO_ERROR;
}
int32_t InputClientStub::onInputReady(int32_t retValue, const sptr<IInputMethodAgent>& agent, const InputChannel* channel)
{
return ErrorCode::NO_ERROR;
}
int32_t InputClientStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
MessageOption &option)
{
IMSA_HILOGI("InputClientStub::OnRemoteRequest. code = %{public}u", code);
auto descriptorToken = data.ReadInterfaceToken();
if (descriptorToken != GetDescriptor()) {
return ErrorCode::ERROR_STATUS_UNKNOWN_TRANSACTION;
}
switch (code) {
case ON_INPUT_READY: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
if (data.ReadInt32() > 0) {
parcel->WriteRemoteObject(data.ReadRemoteObject());
}
if (data.ReadInt32() > 0) {
parcel->WriteParcelable(data.ReadParcelable<InputChannel>());
}
int32_t InputClientStub::onInputReleased(int32_t retValue)
{
return ErrorCode::NO_ERROR;
}
Message* msg = new Message(MessageID::MSG_ID_ON_INPUT_READY, parcel);
msgHandler->SendMessage(msg);
break;
}
case ON_INPUT_RELEASED: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
Message* msg = new Message(MessageID::MSG_ID_EXIT_SERVICE, parcel);
msgHandler->SendMessage(msg);
break;
}
case SET_DISPLAY_MODE: {
if (msgHandler == nullptr) {
break;
}
MessageParcel* parcel = new MessageParcel();
parcel->WriteInt32(data.ReadInt32());
Message* msg = new Message(MessageID::MSG_ID_SET_DISPLAY_MODE, parcel);
msgHandler->SendMessage(msg);
break;
}
default:
return IPCObjectStub::OnRemoteRequest(code, data, reply, option);
}
return NO_ERROR;
}
int32_t InputClientStub::setDisplayMode(int32_t mode)
{
return ErrorCode::NO_ERROR;
}
int32_t InputClientStub::onInputReady(int32_t retValue, const sptr<IInputMethodAgent>& agent,
const InputChannel* channel) {
return ErrorCode::NO_ERROR;
}
void InputClientStub::SetHandler(MessageHandler* handler)
{
msgHandler = handler;
}
int32_t InputClientStub::onInputReleased(int32_t retValue)
{
return ErrorCode::NO_ERROR;
}
int32_t InputClientStub::setDisplayMode(int32_t mode)
{
return ErrorCode::NO_ERROR;
}
void InputClientStub::SetHandler(MessageHandler* handler)
{
msgHandler = handler;
}
}
}