Skip to content

Commit

Permalink
ngfd: Always vibrate on calendar and clock events. Closes AsteroidOS/…
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentRevest committed May 14, 2017
1 parent e565574 commit c55bdf1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
@@ -0,0 +1,29 @@
From e4b515f61f80c85c1142d9b406fee919408ffb7f Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Sun, 14 May 2017 17:40:11 +0200
Subject: [PATCH] haptics: Always vibrate on calendar and clock events

---
src/ngf/haptic.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/src/ngf/haptic.c b/src/ngf/haptic.c
index 795adae..e3c4dde 100644
--- a/src/ngf/haptic.c
+++ b/src/ngf/haptic.c
@@ -57,6 +57,12 @@ n_haptic_can_handle (NSinkInterface *iface, NRequest *request)
call_state = (NValue*) n_context_get_value (context,
"call_state.mode");

+ /* Always vibrate on Alarms regardless of enabled
+ * https://github.com/AsteroidOS/asteroid-launcher/issues/17 */
+ if (strcmp (event_name, "clock") == 0 || strcmp (event_name, "calendar") == 0) {
+ return TRUE;
+ }
+
if (touch_level == NULL) {
N_WARNING (LOG_CAT "No value for touchscreen.vibration.level!");
}
--
2.11.0

3 changes: 2 additions & 1 deletion recipes-nemomobile/ngfd/ngfd_git.bb
Expand Up @@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"

SRC_URI = "git://git.merproject.org/mer-core/ngfd.git;protocol=https \
file://ngfd.ini \
file://ngfd.service"
file://ngfd.service \
file://0001-haptics-Always-vibrate-on-calendar-and-clock-events.patch"
SRCREV = "fbeea2a48bebd3faaac1ee84a144f797ac9006fc"
PR = "r1"
PV = "+git${SRCPV}"
Expand Down

0 comments on commit c55bdf1

Please sign in to comment.