summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tyler Gunn <tgunn@google.com> 2017-12-15 09:09:14 -0800
committer Tyler Gunn <tgunn@google.com> 2018-01-12 08:24:21 -0800
commitf780837575a27519c0f87f91c24990299968498c (patch)
tree73111051edfa4e17d6ca67394c9d88a81aad3300
parent08498c32f4dcde61e7539f70910983d0766b9fd1 (diff)
Add new IMS reasoninfo to handle alternate emergency disconnect scenario.
Adding new ImsReasonInfo and corresponding DisconnectCause code. Test: Manual, added unit test for code remapping. Bug: 69024173 Change-Id: I30da4f2493fe19fe04365b9067c7feeb90a917a3
-rw-r--r--telephony/java/android/telephony/DisconnectCause.java9
-rw-r--r--telephony/java/com/android/ims/ImsReasonInfo.java7
2 files changed, 16 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 56e1e640373d..4fa304ae3b97 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -310,6 +310,13 @@ public class DisconnectCause {
* {@hide}
*/
public static final int DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 70;
+
+ /**
+ * The network has reported that an alternative emergency number has been dialed, but the user
+ * must exit airplane mode to place the call.
+ */
+ public static final int IMS_SIP_ALTERNATE_EMERGENCY_CALL = 71;
+
//*********************************************************************************************
// When adding a disconnect type:
// 1) Update toString() with the newly added disconnect type.
@@ -462,6 +469,8 @@ public class DisconnectCause {
return "EMERGENCY_PERM_FAILURE";
case NORMAL_UNSPECIFIED:
return "NORMAL_UNSPECIFIED";
+ case IMS_SIP_ALTERNATE_EMERGENCY_CALL:
+ return "IMS_SIP_ALTERNATE_EMERGENCY_CALL";
default:
return "INVALID: " + cause;
}
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java
index 4f6f68c34e3a..83d9bd94013e 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/com/android/ims/ImsReasonInfo.java
@@ -384,6 +384,13 @@ public class ImsReasonInfo implements Parcelable {
/** Call/IMS registration is failed/dropped because of a network detach */
public static final int CODE_NETWORK_DETACH = 1513;
+ /**
+ * Call failed due to SIP code 380 (Alternative Service response) while dialing an "undetected
+ * emergency number". This scenario is important in some regions where the carrier network will
+ * identify other non-emergency help numbers (e.g. mountain rescue) when attempting to dial.
+ */
+ public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514;
+
/* OEM specific error codes. To be used by OEMs when they don't want to
reveal error code which would be replaced by ERROR_UNSPECIFIED */
public static final int CODE_OEM_CAUSE_1 = 0xf001;