summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsman Abdullah <uabdullah@google.com>2016-04-22 21:44:15 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-22 21:44:15 +0000
commit2fd76a25f3d5a8c5b9c13178fcd7abee186d49da (patch)
tree45e2824da519184402c1ba99630aeb81c5a8cb4a
parent535bd2d98926e96dbced8fee8a371e8c9acf0b2c (diff)
parent7517b02d6d76c1d0fb1dcd776437d7509cb89552 (diff)
Merge "Call correct number from missing call notification." into nyc-dev am: 71f6781
am: 7517b02 * commit '7517b02d6d76c1d0fb1dcd776437d7509cb89552': Call correct number from missing call notification. Change-Id: Ibd08841ecd9c279727ee77e983cca019ab1064d7
-rw-r--r--src/com/android/dialer/calllog/MissedCallNotifier.java6
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);
}
/**