summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-12-01 21:23:16 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-01 21:23:16 +0000
commitcd75373fcc49810751675bcd36bd7d7dee5055e9 (patch)
treebd05dc246b2aa32354ea8cd1d76a40febd2c1271
parent7c74d779eb1fa514d270cc9a0a399e850afd7130 (diff)
parent42536098ca6f291ff26f1d7058be520796094429 (diff)
am 5c3e3745: Merge "Check for generic conference for showing notification." into lmp-mr1-dev
* commit '5c3e3745a7e02f40a45f59070cb0a52f50a51c27': Check for generic conference for showing notification.
-rw-r--r--InCallUI/src/com/android/incallui/StatusBarNotifier.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index 0c48c1939..4737c8fe8 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -31,6 +31,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import android.os.Message;
import android.telecom.PhoneAccount;
+import android.telecom.PhoneCapabilities;
import android.text.TextUtils;
import com.android.contacts.common.util.BitmapUtil;
@@ -260,15 +261,12 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
}
final int state = call.getState();
- final boolean isConference = call.isConferenceCall();
- final boolean isVideoUpgradeRequest = call.getSessionModificationState()
- == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;
// Check if data has changed; if nothing is different, don't issue another notification.
final int iconResId = getIconToDisplay(call);
- final Bitmap largeIcon = getLargeIconToDisplay(contactInfo, isConference);
+ final Bitmap largeIcon = getLargeIconToDisplay(contactInfo, call);
final int contentResId = getContentString(call);
- final String contentTitle = getContentTitle(contactInfo, isConference);
+ final String contentTitle = getContentTitle(contactInfo, call);
if (!checkForChangeAndSaveData(iconResId, contentResId, largeIcon, contentTitle, state)) {
return;
@@ -296,6 +294,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
builder.setLargeIcon(largeIcon);
builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));
+ final boolean isVideoUpgradeRequest = call.getSessionModificationState()
+ == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;
if (isVideoUpgradeRequest) {
builder.setUsesChronometer(false);
addDismissUpgradeRequestAction(builder);
@@ -382,8 +382,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
/**
* Returns the main string to use in the notification.
*/
- private String getContentTitle(ContactCacheEntry contactInfo, boolean isConference) {
- if (isConference) {
+ private String getContentTitle(ContactCacheEntry contactInfo, Call call) {
+ if (call.isConferenceCall() && !call.can(PhoneCapabilities.GENERIC_CONFERENCE)) {
return mContext.getResources().getString(R.string.card_title_conf_call);
}
if (TextUtils.isEmpty(contactInfo.name)) {
@@ -406,9 +406,9 @@ 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, boolean isConference) {
+ private Bitmap getLargeIconToDisplay(ContactCacheEntry contactInfo, Call call) {
Bitmap largeIcon = null;
- if (isConference) {
+ if (call.isConferenceCall() && !call.can(PhoneCapabilities.GENERIC_CONFERENCE)) {
largeIcon = BitmapFactory.decodeResource(mContext.getResources(),
R.drawable.img_conference);
}