summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Wang <wangqi@google.com>2016-04-22 21:41:05 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-22 21:41:05 +0000
commitbeceabb79178ab5621d8aaca9bdc7127f4b3dae3 (patch)
treee1b9aeb108350ebcf72f739e942bf3fdbeeac386
parentdfbc95d0bddcc48d96f1881209cbda066820465b (diff)
parent71f6781457dc388aca7f8443f6cad511fa8fc8a9 (diff)
Merge "Call correct number from missing call notification." into nyc-dev
am: 71f6781 * commit '71f6781457dc388aca7f8443f6cad511fa8fc8a9': Call correct number from missing call notification. Change-Id: I4688844315c8ece6497397da3f6e38f03a686d46
-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);
}
/**