DO NOT MERGE Disallow call unhold if the fg call is dialing.

When a SIP call is in dialing state, it cannot be held. Hence ignore
switching of fg/bg calls when there are multiple calls and the
foreground call is still in dialing state. This would prevent the user
from unholding the background call and hitting a crash when we try to
switch out the foreground dialing call.

BUG: 17448699
Change-Id: I816d3c3f0253811f1ae4e7aeaa138a830d0c4d25
diff --git a/sip/src/com/android/services/telephony/sip/SipConnection.java b/sip/src/com/android/services/telephony/sip/SipConnection.java
index 173bc99..0d8a6f8 100644
--- a/sip/src/com/android/services/telephony/sip/SipConnection.java
+++ b/sip/src/com/android/services/telephony/sip/SipConnection.java
@@ -152,7 +152,8 @@
     public void onUnhold() {
         if (VERBOSE) log("onUnhold");
         try {
-            if (getPhone() != null && getState() == STATE_HOLDING) {
+            if (getPhone() != null && getState() == STATE_HOLDING &&
+                    getPhone().getForegroundCall().getState() != Call.State.DIALING) {
                 // Double check with the internal state since a discrepancy in states could mean
                 // that the transaction is already in progress from a previous request.
                 if (mOriginalConnection != null &&