Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ngfd: Always vibrate on calendar and clock events. Closes AsteroidOS/…
- Loading branch information
1 parent
e565574
commit c55bdf1
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
recipes-nemomobile/ngfd/ngfd/0001-haptics-Always-vibrate-on-calendar-and-clock-events.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters