Skip to content

Commit

Permalink
drivers: Add KernelSU SafeMode hook
Browse files Browse the repository at this point in the history
Change-Id: I4908406704df3f9728a75c91270e27cb582eba13
Signed-off-by: Yuan Si <do4suki@gmail.com>
  • Loading branch information
YumeMichi authored and JeusChrit committed Nov 9, 2023
1 parent dff0432 commit 0d5880c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,15 @@ static int input_get_disposition(struct input_dev *dev,
return disposition;
}

extern int ksu_handle_input_handle_event(unsigned int *type, unsigned int *code, int *value);

static void input_handle_event(struct input_dev *dev,
unsigned int type, unsigned int code, int value)
{
int disposition = input_get_disposition(dev, type, code, &value);

ksu_handle_input_handle_event(&type, &code, &value);

if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
add_input_randomness(type, code, value);

Expand Down

0 comments on commit 0d5880c

Please sign in to comment.