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

Commit 065103f2 authored by Seungho Lee's avatar Seungho Lee Committed by android-build-merger
Browse files

Merge "Update sound/vibrate notification key only when it actually buzz/beep." am: 5432355d

am: 21d607da

Change-Id: I6570fea210eb95d1a6dcfeac71c3e4b36390db11
parents 7ecd402a 21d607da
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -4808,22 +4808,25 @@ public class NotificationManagerService extends SystemService {
                    }
                    if (DBG) Slog.v(TAG, "Interrupting!");
                    if (hasValidSound) {
                        mSoundNotificationKey = key;
                        if (mInCall) {
                            playInCallNotification();
                            beep = true;
                        } else {
                            beep = playSound(record, soundUri);
                        }
                        if(beep) {
                            mSoundNotificationKey = key;
                        }
                    }

                    final boolean ringerModeSilent =
                            mAudioManager.getRingerModeInternal()
                                    == AudioManager.RINGER_MODE_SILENT;
                    if (!mInCall && hasValidVibrate && !ringerModeSilent) {
                        mVibrateNotificationKey = key;

                        buzz = playVibration(record, vibration, hasValidSound);
                        if(buzz) {
                            mVibrateNotificationKey = key;
                        }
                    }
                }
            }