Skip to content

Fix notification vibration in Android N

Bastien Le Querrec requested to merge fix-447 into master

Fix notification vibration in Android N

Before this PR, a notification is displayed when encrypted message arrives then updated when it is decrypted. The issue remains in the way notifications are updated: the previous one is cancelled and replaced with a new one that contains the decrypted message.

In Android < 7.0, phone will vibrate even if notification is cancelled. Not in Nougat: vibration is stopped if notification is cancelled. That results in no (or very short) vibration for encrypted messages because notification is quickly replaced.

This PR delays notification for encrypted messages. Decryption job is very short (not assessable even on an old N5), so it won't impact usability.

Fixes #447 (closed)

Merge request reports