Handle new error code in CallStateException

Bug: 19583351
Change-Id: I49d26ebbbcc5a006ce0a57170074224ac447e86f
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 22f21ed..1fb70c0 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -334,9 +334,12 @@
             originalConnection = phone.dial(number, request.getVideoState());
         } catch (CallStateException e) {
             Log.e(this, e, "placeOutgoingConnection, phone.dial exception: " + e);
+            int cause = android.telephony.DisconnectCause.OUTGOING_FAILURE;
+            if (e.getError() == CallStateException.ERROR_DISCONNECTED) {
+                cause = android.telephony.DisconnectCause.OUT_OF_SERVICE;
+            }
             connection.setDisconnected(DisconnectCauseUtil.toTelecomDisconnectCause(
-                    android.telephony.DisconnectCause.OUTGOING_FAILURE,
-                    e.getMessage()));
+                    cause, e.getMessage()));
             return;
         }