diff options
author | Usman Abdullah <uabdullah@google.com> | 2016-04-22 21:33:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-04-22 21:33:36 +0000 |
commit | 71f6781457dc388aca7f8443f6cad511fa8fc8a9 (patch) | |
tree | e1b9aeb108350ebcf72f739e942bf3fdbeeac386 /src/com/android | |
parent | 235d706e4aeba527c52c3cb13760791fe6380b37 (diff) | |
parent | 7185e261924b6e501c7c127a1674f49533165406 (diff) |
Merge "Call correct number from missing call notification." into nyc-dev
Diffstat (limited to 'src/com/android')
-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); } /** |