i_input_data_channel.h无用接口删除

Signed-off-by: cy7717 <chenyu301@huawei.com>
This commit is contained in:
cy7717 2022-12-02 15:34:40 +08:00
parent 8d63ff4636
commit 07ed1b107d
8 changed files with 0 additions and 71 deletions

View File

@ -57,7 +57,6 @@ public:
void SetCallingWindow(uint32_t windowId);
int32_t GetEnterKeyType(int32_t &keyType);
int32_t GetInputPattern(int32_t &inputPattern);
void StopInput();
private:
std::thread workThreadHandler;

View File

@ -502,17 +502,6 @@ int32_t InputMethodAbility::GetInputPattern(int32_t &inputPattern)
return channel->GetInputPattern(inputPattern);
}
void InputMethodAbility::StopInput()
{
IMSA_HILOGI("InputMethodAbility::StopInput");
std::shared_ptr<InputDataChannelProxy> channel = GetInputDataChannel();
if (channel == nullptr) {
IMSA_HILOGI("InputMethodAbility::StopInput channel is nullptr");
return;
}
channel->StopInput();
}
void InputMethodAbility::SetInputDataChannel(sptr<IRemoteObject> &object)
{
IMSA_HILOGI("run in SetInputDataChannel");

View File

@ -33,12 +33,10 @@ public:
INSERT_TEXT = 0,
DELETE_FORWARD,
DELETE_BACKWARD,
CLOSE,
GET_TEXT_BEFORE_CURSOR,
GET_TEXT_AFTER_CURSOR,
GET_ENTER_KEY_TYPE,
GET_INPUT_PATTERN,
STOP_INPUT,
SEND_KEYBOARD_STATUS,
SEND_FUNCTION_KEY,
MOVE_CURSOR,
@ -49,7 +47,6 @@ public:
virtual int32_t InsertText(const std::u16string &text) = 0;
virtual int32_t DeleteForward(int32_t length) = 0;
virtual int32_t DeleteBackward(int32_t length) = 0;
virtual void Close() = 0;
virtual int32_t GetTextBeforeCursor(int32_t number, std::u16string &text) = 0;
virtual int32_t GetTextAfterCursor(int32_t number, std::u16string &text) = 0;
virtual void SendKeyboardStatus(int32_t status) = 0;
@ -57,7 +54,6 @@ public:
virtual int32_t MoveCursor(int32_t keyCode) = 0;
virtual int32_t GetEnterKeyType(int32_t &keyType) = 0;
virtual int32_t GetInputPattern(int32_t &inputPattern) = 0;
virtual void StopInput() = 0;
};
} // namespace MiscServices
} // namespace OHOS

View File

@ -38,7 +38,6 @@ public:
int32_t InsertText(const std::u16string &text) override;
int32_t DeleteForward(int32_t length) override;
int32_t DeleteBackward(int32_t length) override;
void Close() override;
int32_t GetTextBeforeCursor(int32_t number, std::u16string &text) override;
int32_t GetTextAfterCursor(int32_t number, std::u16string &text) override;
void SendKeyboardStatus(int32_t status) override;
@ -46,7 +45,6 @@ public:
int32_t MoveCursor(int32_t keyCode) override;
int32_t GetEnterKeyType(int32_t &keyType) override;
int32_t GetInputPattern(int32_t &inputPattern) override;
void StopInput() override;
private:
static inline BrokerDelegator<InputDataChannelProxy> delegator_;

View File

@ -42,7 +42,6 @@ public:
int32_t InsertText(const std::u16string &text) override;
int32_t DeleteForward(int32_t length) override;
int32_t DeleteBackward(int32_t length) override;
void Close() override;
int32_t GetTextBeforeCursor(int32_t number, std::u16string &text) override;
int32_t GetTextAfterCursor(int32_t number, std::u16string &text) override;
void SendKeyboardStatus(int32_t status) override;
@ -50,7 +49,6 @@ public:
int32_t MoveCursor(int32_t keyCode) override;
int32_t GetEnterKeyType(int32_t &keyType) override;
int32_t GetInputPattern(int32_t &inputPattern) override;
void StopInput() override;
private:
MessageHandler *msgHandler;

View File

@ -75,18 +75,6 @@ int32_t InputDataChannelProxy::DeleteBackward(int32_t length)
return result;
}
void InputDataChannelProxy::Close()
{
IMSA_HILOGI("InputDataChannelProxy::Close");
MessageParcel data, reply;
MessageOption option;
data.WriteInterfaceToken(GetDescriptor());
auto ret = Remote()->SendRequest(CLOSE, data, reply, option);
if (ret != NO_ERROR) {
}
}
int32_t InputDataChannelProxy::GetTextBeforeCursor(int32_t number, std::u16string &text)
{
IMSA_HILOGI("InputDataChannelProxy::GetTextBeforeCursor");
@ -178,15 +166,5 @@ int32_t InputDataChannelProxy::GetInputPattern(int32_t &inputPattern)
inputPattern = reply.ReadInt32();
return result;
}
void InputDataChannelProxy::StopInput()
{
IMSA_HILOGI("InputDataChannelProxy::StopInput");
MessageParcel data, reply;
MessageOption option;
data.WriteInterfaceToken(GetDescriptor());
Remote()->SendRequest(STOP_INPUT, data, reply, option);
}
} // namespace MiscServices
} // namespace OHOS

View File

@ -29,10 +29,6 @@ InputDataChannelStub::InputDataChannelStub() : msgHandler(nullptr)
InputDataChannelStub::~InputDataChannelStub()
{
if (msgHandler) {
delete msgHandler;
msgHandler = nullptr;
}
}
int32_t InputDataChannelStub::OnRemoteRequest(
@ -59,10 +55,6 @@ int32_t InputDataChannelStub::OnRemoteRequest(
DeleteBackward(length);
break;
}
case CLOSE: {
Close();
break;
}
case GET_TEXT_BEFORE_CURSOR: {
auto number = data.ReadInt32();
std::u16string text;
@ -104,10 +96,6 @@ int32_t InputDataChannelStub::OnRemoteRequest(
reply.WriteInt32(inputPattern);
break;
}
case STOP_INPUT: {
StopInput();
break;
}
default:
return IPCObjectStub::OnRemoteRequest(code, data, reply, option);
}
@ -155,10 +143,6 @@ int32_t InputDataChannelStub::DeleteBackward(int32_t length)
return ErrorCode::ERROR_CLIENT_NULL_POINTER;
}
void InputDataChannelStub::Close()
{
}
int32_t InputDataChannelStub::GetTextBeforeCursor(int32_t number, std::u16string &text)
{
IMSA_HILOGI("InputDataChannelStub::GetTextBeforeCursor");
@ -183,12 +167,6 @@ int32_t InputDataChannelStub::GetInputPattern(int32_t &inputPattern)
return InputMethodController::GetInstance()->GetInputPattern(inputPattern);
}
void InputDataChannelStub::StopInput()
{
IMSA_HILOGI("InputDataChannelStub::StopInput");
InputMethodController::GetInstance()->HideTextInput();
}
void InputDataChannelStub::SendKeyboardStatus(int32_t status)
{
IMSA_HILOGI("InputDataChannelStub::SendKeyboardStatus");

View File

@ -129,12 +129,6 @@ void TestGetInputPattern()
ability->GetInputPattern(inputPattern);
}
void TestStopInput()
{
sptr<InputMethodAbility> ability = InputMethodAbility::GetInstance();
ability->StopInput();
}
} // namespace OHOS
/* Fuzzer entry point */
@ -168,6 +162,5 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
OHOS::TestGetEnterKeyType();
OHOS::TestGetInputPattern();
OHOS::TestStopInput();
return 0;
}