IMS-VT: Modify conditional logic of showing upgrade video icon
Check for active/held call before checking for
capabilities to fix issue of upgrade video icon coming on
dialing emergency number in wcdma mode.
Change-Id: I4962bbc832c9b6526fb1de87498fc6fc7eb3e139
CRs-Fixed: 1098780
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index 8af8835..e93ecda 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -499,11 +499,11 @@
final boolean showUpgradeToVideo =
/* When useExt is true, show upgrade button for an active/held
call if the call has either voice or video capabilities */
+ ((isCallActive || isCallOnHold) &&
((useExt && QtiCallUtils.hasVoiceOrVideoCapabilities(call)) ||
/* When useCustomVideoUi is true, show upgrade button for an active/held
voice call only if the current call has video capabilities */
- (useCustomVideoUi && !isVideo && hasVideoCallCapabilities(call))
- && (isCallActive || isCallOnHold)) ||
+ (useCustomVideoUi && !isVideo && hasVideoCallCapabilities(call)))) ||
/* When useExt and custom UI are false, default to Google behaviour */
(!isVideo && !useExt && !useCustomVideoUi && hasVideoCallCapabilities(call));