summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2015-03-08 12:48:40 +0100
committerDanny Baumann <dannybaumann@web.de>2015-03-08 12:48:40 +0100
commit967f67c32f9d7ef80620a3fffe1ac060d7523d3c (patch)
tree5e54cb34cadefcacc0ae87ff79c145c4ab2ea44a
parent2805a4952088cdabf7cc80488f1ee7efb842758c (diff)
downloadandroid_packages_apps_InCallUI-967f67c32f9d7ef80620a3fffe1ac060d7523d3c.tar.gz
android_packages_apps_InCallUI-967f67c32f9d7ef80620a3fffe1ac060d7523d3c.tar.bz2
android_packages_apps_InCallUI-967f67c32f9d7ef80620a3fffe1ac060d7523d3c.zip
Fix MSIM incoming call notification handling.
There's no need to handle MSIM twice for the notification. Additionally, the SIM name isn't the most important information in that notification, so don't treat it as such: Revert to AOSP behaviour (caller name as title, 'incoming call' as content) and add the SIM name as subtext, which matches what we already do for incoming SMS. Change-Id: I4cb8bbb8fa4f44515e8552d6882fb7134978ad37
-rw-r--r--src/com/android/incallui/StatusBarNotifier.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java
index 3c21a520..bd1e939e 100644
--- a/src/com/android/incallui/StatusBarNotifier.java
+++ b/src/com/android/incallui/StatusBarNotifier.java
@@ -276,14 +276,6 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
return;
}
- // set the content
- String contentText = mContext.getString(contentResId);
- if (TelephonyManager.getDefault().isMultiSimEnabled()) {
- SubInfoRecord info = SubscriptionManager.getSubInfoForSubscriber(call.getSubId());
- if (info != null) {
- contentText += " (" + info.displayName + ")";
- }
- }
/*
* Nothing more to check...build and send it.
*/
@@ -300,20 +292,16 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
}
// Set the content
- builder.setContentText(contentText);
+ builder.setContentText(mContext.getString(contentResId));
builder.setSmallIcon(iconResId);
builder.setContentTitle(contentTitle);
builder.setLargeIcon(largeIcon);
builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));
if (TelephonyManager.getDefault().isMultiSimEnabled()) {
- final long subId = call.getSubId();
- SubInfoRecord subInfoRecord = SubscriptionManager.getSubInfoForSubscriber(subId);
- if (subInfoRecord != null) {
- String displayName = subInfoRecord.displayName;
- builder.setContentTitle(displayName);
- builder.setContentText(contentTitle);
- builder.setSubText(mContext.getString(contentResId));
+ SubInfoRecord info = SubscriptionManager.getSubInfoForSubscriber(call.getSubId());
+ if (info != null) {
+ builder.setSubText(info.displayName);
}
}