summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorChristine Chen <christinech@google.com>2013-09-11 01:51:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-11 01:51:52 +0000
commita4f0add23f17283d58912170977f211bd4b0faf0 (patch)
tree268047c6cda0093e3bcf18e41772dfbbd1d69165 /InCallUI
parent0b99c0e28fd45bfd542c1e1d1bd6e9390008de69 (diff)
parentdb3fcfe4e527897381e8874dd7e6e08cd3355e86 (diff)
Merge "Modifies status bar indicator for conference call." into klp-dev
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/StatusBarNotifier.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index c5b60fe82..ad1a67e77 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -25,6 +25,7 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
@@ -215,10 +216,11 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
private void buildAndSendNotification(InCallState state, Call call,
ContactCacheEntry contactInfo, boolean allowFullScreenIntent) {
+ final boolean isConference = call.isConferenceCall();
final int iconResId = getIconToDisplay(call);
- final Bitmap largeIcon = getLargeIconToDisplay(contactInfo);
+ final Bitmap largeIcon = getLargeIconToDisplay(contactInfo, isConference);
final int contentResId = getContentString(call);
- final String contentTitle = getContentTitle(contactInfo);
+ final String contentTitle = getContentTitle(contactInfo, isConference);
// If we checked and found that nothing is different, dont issue another notification.
if (!checkForChangeAndSaveData(iconResId, contentResId, largeIcon, contentTitle, state,
@@ -316,7 +318,10 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
/**
* Returns the main string to use in the notification.
*/
- private String getContentTitle(ContactCacheEntry contactInfo) {
+ private String getContentTitle(ContactCacheEntry contactInfo, boolean isConference) {
+ if (isConference) {
+ return mContext.getResources().getString(R.string.card_title_conf_call);
+ }
if (TextUtils.isEmpty(contactInfo.name)) {
return contactInfo.number;
}
@@ -327,7 +332,11 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
/**
* Gets a large icon from the contact info object to display in the notification.
*/
- private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo) {
+ private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, boolean isConference) {
+ if (isConference) {
+ return BitmapFactory.decodeResource(mContext.getResources(),
+ R.drawable.picture_conference);
+ }
if (contactInfo.photo != null && (contactInfo.photo instanceof BitmapDrawable)) {
return ((BitmapDrawable) contactInfo.photo).getBitmap();
}