Loading
quiethours: fix vibration logic
While QuietHours have different modes for haptic feedback and vibration, indeed both uses the underlying VibratorService. This change adds some basic logic to detect what quiethours mode should be applied to block access to vibrate calls during quiethours. This patch assumes: 1.- Single pattern vibrate calls are treated as haptic feedback if milliseconds vibration is lower than 70 milliseconds 2.- Multiple pattern vibrate calls are treated as haptic feedback if the total duration of the pattern is lower than 70 milliseconds and they doesn't need to be repeated. JIRA: NIGHTLIES-175 https://jira.cyanogenmod.org/browse/NIGHTLIES-175 Signed-off-by:Jorge Ruesga <jorge@ruesga.com> Change-Id: I0d090ca1189a5d132bf6a835e9921cf41e02d1fb