Update sound/vibrate notification key only when it actually buzz/beep.
Test: Make notification with vibration pattern with [0] Test: Check mVibrateNotificationKey unchanged Change-Id: I208797f370ac5a30db5fcc316be956335a418319 Merged-In: I208797f370ac5a30db5fcc316be956335a418319
This commit is contained in:
committed by
Julia Reynolds
parent
4e780bd992
commit
2ca1aec1b9
@@ -4799,22 +4799,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user