• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "dfx_hisysevent.h"
17 #include "entrance_log.h"
18 #include "window_manager_hilog.h"
19 
20 namespace OHOS {
21 namespace Rosen {
22 namespace {
23 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, HILOG_DOMAIN_WINDOW, "DfxHisysevent" };
24 } // namespace
25 
ApplicationBlockInput(int32_t eventId,int32_t pid,std::string bundleName,int32_t persistentId)26 void DfxHisysevent::ApplicationBlockInput(int32_t eventId, int32_t pid, std::string bundleName, int32_t persistentId)
27 {
28     CALL_DEBUG_ENTER;
29     int32_t ret = HiSysEventWrite(
30         OHOS::HiviewDFX::HiSysEvent::Domain::WINDOW_MANAGER,
31         "APPLICATION_BLOCK_INPUT",
32         OHOS::HiviewDFX::HiSysEvent::EventType::FAULT,
33         "EVENT_ID", eventId,
34         "PID", pid,
35         "BUNDLE_NAME", bundleName,
36         "PERSISTENT_ID", persistentId,
37         "MSG", "User input does not respond");
38     if (ret != 0) {
39         WLOGFE("Write HiSysEvent error, ret:%{public}d", ret);
40     }
41 }
42 } // namespace Rosen
43 } // namespace OHOS
44 
45