Signed-off-by: GlaryCastle <yangpeng190@huawei.com>

Changes to be committed:
	modified:   bundle.json
	modified:   frameworks/inputmethod_controller/BUILD.gn
	modified:   frameworks/inputmethod_controller/include/input_method_controller.h
	modified:   frameworks/inputmethod_controller/src/input_method_controller.cpp
	new file:   hisysevent.yaml
	modified:   services/BUILD.gn
	new file:   services/dfx/include/inputmethod_dump.h
	new file:   services/dfx/include/inputmethod_sysevent.h
	new file:   services/dfx/include/inputmethod_trace.h
        new file:   services/dfx/src/inputmethod_dump.cpp
	new file:   services/dfx/src/inputmethod_sysevent.cpp
	new file:   services/dfx/src/inputmethod_trace.cpp
	modified:   services/include/input_method_system_ability.h
	modified:   services/include/peruser_session.h
	modified:   services/src/input_method_system_ability.cpp
	modified:   services/src/peruser_session.cpp
This commit is contained in:
GlaryCastle
2022-07-05 17:04:41 +08:00
parent 670dcecc71
commit 14290656c6
16 changed files with 410 additions and 3 deletions
@@ -17,6 +17,8 @@
#include "iservice_registry.h"
#include "system_ability_definition.h"
#include "global.h"
#include "inputmethod_sysevent.h"
#include "inputmethod_trace.h"
namespace OHOS {
namespace MiscServices {
@@ -82,9 +84,14 @@ using namespace MessageID;
return nullptr;
}
int32_t uid = IPCSkeleton::GetCallingUid();
std::string strBundleName;
strBundleName = "com.inputmethod.default";
auto systemAbility = systemAbilityManager->GetSystemAbility(INPUT_METHOD_SYSTEM_ABILITY_ID, "");
if (!systemAbility) {
IMSA_HILOGI("InputMethodController::GetImsaProxy systemAbility is nullptr");
FaultReporter(uid, strBundleName, ErrorCode::ERROR_NULL_POINTER);
return nullptr;
}
@@ -198,8 +205,9 @@ using namespace MessageID;
{
textListener = listener;
IMSA_HILOGI("InputMethodController::Attach");
PrepareInput(0, mClient, mInputDataChannel, mAttribute);
InputmethodTrace tracer("InputMethodController Attach trace.");
StartInput(mClient);
PrepareInput(0, mClient, mInputDataChannel, mAttribute);
}
void InputMethodController::ShowTextInput()
@@ -230,6 +238,7 @@ using namespace MessageID;
void InputMethodController::Close()
{
ReleaseInput(mClient);
InputmethodTrace tracer("InputMethodController Close trace.");
textListener = nullptr;
IMSA_HILOGI("InputMethodController::Close");
}