Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5f043a6 authored by Alexey Kuzmin's avatar Alexey Kuzmin
Browse files

Mark USAGE_NOTIFICATION_EVENT vibrations as notifications

Non-notification background vibrations are ignored. However, we don't
want to ignore notifications that represent various events, such as
reminders.
Test: Create a calendar event with a reminder. Close calendar and wait
for reminder. The device should vibrate when the reminder pops up.
Bug: 139523314

Change-Id: I231239daf7cc85bf69aaeef1da31218a23fcf311
parent 95a675ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,7 @@ public class VibratorService extends IVibratorService.Stub
    private static boolean isNotification(int usageHint) {
        switch (usageHint) {
            case AudioAttributes.USAGE_NOTIFICATION:
            case AudioAttributes.USAGE_NOTIFICATION_EVENT:
            case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST:
            case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_INSTANT:
            case AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_DELAYED: