Skip to content

Commit

Permalink
[fingerprint] Disable sms/email led on fp wakeup. Fixes JB#43914
Browse files Browse the repository at this point in the history
Type 6 led patterns are automatically deactivated when user does something
explicit to unblank device display. This deactivation is triggered in input
event processing. As fingerprint sensor use does not involve input events,
the led patterns are left active when user wakes up device with fp scanner.

Use synthetic input event to trigger led pattern deactivation.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 11, 2019
1 parent f3d5ba9 commit 1df7179
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/fingerprint.c
Expand Up @@ -25,6 +25,7 @@
#include "../mce-log.h"
#include "../mce-dbus.h"
#include "../mce-setting.h"
#include "../evdev.h"

#include <linux/input.h>

Expand Down Expand Up @@ -2651,6 +2652,20 @@ fpwakeup_trigger(void)

/* Exit from lockscreen */
mce_datapipe_request_tklock(TKLOCK_REQUEST_OFF);

/* Deactivate type=6 led patterns (e.g. sms/email notifications)
* by signaling "true user activity" via synthetized gesture
* input event. (The event type ought not matter, but using
* double tap event is somewhat logical and does not cause side
* effects in the few places where the event type is actually
* checked.)
*/
const struct input_event ev = {
.type = EV_MSC,
.code = MSC_GESTURE,
.value = GESTURE_DOUBLETAP | GESTURE_SYNTHESIZED,
};
datapipe_exec_full(&user_activity_event_pipe, &ev);
}
}

Expand Down

0 comments on commit 1df7179

Please sign in to comment.