diff options
-rw-r--r-- | src/com/android/dialer/calllog/MissedCallNotifier.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/MissedCallNotifier.java b/src/com/android/dialer/calllog/MissedCallNotifier.java index 98d02d095..20fc5d551 100644 --- a/src/com/android/dialer/calllog/MissedCallNotifier.java +++ b/src/com/android/dialer/calllog/MissedCallNotifier.java @@ -254,7 +254,8 @@ public class MissedCallNotifier { intent.setAction( CallLogNotificationsService.ACTION_CALL_BACK_FROM_MISSED_CALL_NOTIFICATION); intent.putExtra(CallLogNotificationsService.EXTRA_MISSED_CALL_NUMBER, number); - return PendingIntent.getService(mContext, 0, intent, 0); + // Use FLAG_ONE_SHOT to avoid reusing previous PendingIntent with different number. + return PendingIntent.getService(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT); } private PendingIntent createSendSmsFromNotificationPendingIntent(String number) { @@ -262,7 +263,8 @@ public class MissedCallNotifier { intent.setAction( CallLogNotificationsService.ACTION_SEND_SMS_FROM_MISSED_CALL_NOTIFICATION); intent.putExtra(CallLogNotificationsService.EXTRA_MISSED_CALL_NUMBER, number); - return PendingIntent.getService(mContext, 0, intent, 0); + // Use FLAG_ONE_SHOT to avoid reusing previous PendingIntent with different number. + return PendingIntent.getService(mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT); } /** |