Merge "Handle IMEI_NOT_ACCEPTED disconnect cause" am: f0d41e446b
am: a7f09ede14

Change-Id: Ied27f4190e55347dbdbce47217301f588c1bf39f
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bcad6f7..965a214 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1363,6 +1363,11 @@
         There are too many active calls. Please end or merge existing calls before placing a new one.
     </string>
 
+    <!-- Call failure reason: If the network does not accept the emergency call request, e.g., because IMEI was used as identification and this capability is not supported -->
+    <string name="callFailed_imei_not_accepted">
+        Unable to connect, please insert a valid SIM card.
+    </string>
+
     <!-- The title for the change voicemail PIN activity -->
     <string name="change_pin_title">Change Voicemail PIN</string>
     <!-- The label for the continue button in change voicemail PIN activity -->
diff --git a/src/com/android/services/telephony/DisconnectCauseUtil.java b/src/com/android/services/telephony/DisconnectCauseUtil.java
index 6eb4a4e..534f510 100644
--- a/src/com/android/services/telephony/DisconnectCauseUtil.java
+++ b/src/com/android/services/telephony/DisconnectCauseUtil.java
@@ -129,6 +129,7 @@
             case android.telephony.DisconnectCause.DATA_DISABLED:
             case android.telephony.DisconnectCause.DATA_LIMIT_REACHED:
             case android.telephony.DisconnectCause.DIALED_ON_WRONG_SLOT:
+            case android.telephony.DisconnectCause.IMEI_NOT_ACCEPTED:
                 return DisconnectCause.ERROR;
 
             case android.telephony.DisconnectCause.DIALED_MMI:
@@ -381,6 +382,10 @@
                 resourceId = R.string.callFailed_data_limit_reached_description;
                 break;
 
+            case android.telephony.DisconnectCause.IMEI_NOT_ACCEPTED:
+                resourceId = R.string.callFailed_imei_not_accepted;
+                break;
+
             default:
                 break;
         }