summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Seungho Lee <shiny.lee@samsung.com> 2019-01-03 13:09:22 -0800
committer android-build-merger <android-build-merger@google.com> 2019-01-03 13:09:22 -0800
commit21d607da99f3ed5d7887420becb5197269a03a3e (patch)
treee6cab23f2436ae5cede1c455f0a1d85344855b20
parent186fcb585f50edef453b9510894e177ea71aa28d (diff)
parent5432355d0c7a7073d85ad3b2780e46bb69c0ac3f (diff)
Merge "Update sound/vibrate notification key only when it actually buzz/beep."
am: 5432355d0c Change-Id: I14f418a9b09826c58817586f7635277ef6833b90
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index ff7a8b63de79..bca3f5d7c59f 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -4807,22 +4807,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;
+ }
}
}
}