mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-07-20 19:27:49 -04:00
zerohung: open zerohung feature
ohos inclusion category: feature issue: #I4PJDN CVE: NA ----------------- zerohung is used to detect and upload kernel event. Signed-off-by: zhizhimeimei6 <zhangminghao11@huawei.com>
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
#include "osal_mem.h"
|
||||
#include "osal_timer.h"
|
||||
|
||||
#ifdef CONFIG_DFX_ZEROHUNG
|
||||
#include <dfx/hung_wp_screen.h>
|
||||
#endif
|
||||
|
||||
#define TIMER_INTERVAL 500
|
||||
#define REPEAT_VALUE 2
|
||||
#define MEMCPY_CHECK_RETURN(ret) do { \
|
||||
@@ -283,6 +287,10 @@ static void RepateEvent(const InputDevice *device)
|
||||
|
||||
void HidReportEvent(const void *inputDev, uint32_t type, uint32_t code, int32_t value)
|
||||
{
|
||||
#ifdef CONFIG_DFX_ZEROHUNG
|
||||
if (type == EV_KEY && code == KEY_POWER)
|
||||
hung_wp_screen_powerkey_ncb(value);
|
||||
#endif
|
||||
InputDevice *device = (InputDevice *)inputDev;
|
||||
PushOnePackage(device, type, code, value);
|
||||
if (type == EV_KEY && KEY_RESERVED < code && code < KEY_MAX && value == 0 && code == g_kbdcode) {
|
||||
|
||||
Reference in New Issue
Block a user