diff options
author | Shaoxu Liu <shaoxu@codeaurora.org> | 2015-10-12 14:28:25 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-12-03 10:09:55 -0800 |
commit | 688dc6f15f26d9e29604eef24e303cb1fe43ea25 (patch) | |
tree | f3998e77bbf917d247241f62a5258b954f77e79a /telephony | |
parent | a356fec8f9cbf9dcfb8d1e0a05ec2b6ccde36c91 (diff) | |
download | frameworks_base-688dc6f15f26d9e29604eef24e303cb1fe43ea25.zip frameworks_base-688dc6f15f26d9e29604eef24e303cb1fe43ea25.tar.gz frameworks_base-688dc6f15f26d9e29604eef24e303cb1fe43ea25.tar.bz2 |
telephony: Make the disconnect cause distinguishable
Modify the disconnect cause code to make them distinguishable.
Following the guide comments, update the cause code mappings.
Change-Id: Ib10f2fad3f95fa3b88ee02c476605f583e943cd2
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/DisconnectCause.java | 198 |
1 files changed, 147 insertions, 51 deletions
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java index e2e8326..bc0d644 100644 --- a/telephony/java/android/telephony/DisconnectCause.java +++ b/telephony/java/android/telephony/DisconnectCause.java @@ -190,6 +190,57 @@ public class DisconnectCause { /** call failed due to LTE to 3G/2G handover not feasible */ public static final int HO_NOT_FEASIBLE = 50; + public static final int NO_CIRCUIT_AVAIL = 51; + public static final int NO_ROUTE_TO_DESTINAON = 52; + public static final int OPERATOR_DETERMINED_BARRING = 53; + public static final int CALL_FAIL_NO_USER_RESPONDING = 54; + public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 55; + public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 56; + public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 57; + public static final int CHANNEL_UNACCEPTABLE = 58; + public static final int CALL_REJECTED = 59; + public static final int NUMBER_CHANGED = 60; + public static final int PREEMPTION = 61; + public static final int FACILITY_REJECTED = 62; + public static final int RESP_TO_STATUS_ENQUIRY = 63; + public static final int NORMAL_UNSPECIFIED = 64; + public static final int NETWORK_OUT_OF_ORDER = 65; + public static final int TEMPORARY_FAILURE = 66; + public static final int SWITCHING_EQUIPMENT_CONGESTION = 67; + public static final int ACCESS_INFORMATION_DISCARDED = 68; + public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 69; + public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 70; + public static final int QOS_UNAVAILABLE = 71; + public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 72; + public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 73; + public static final int BEARER_CAPABILITY_UNAVAILABLE = 74; + public static final int SERVICE_OPTION_NOT_AVAILABLE = 75; + public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 76; + public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 77; + public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 78; + public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79; + public static final int INVALID_TRANSACTION_IDENTIFIER = 80; + public static final int USER_NOT_MEMBER_OF_CUG = 81; + public static final int INCOMPATIBLE_DESTINATION = 82; + public static final int INVALID_TRANSIT_NW_SELECTION = 83; + public static final int SEMANTICALLY_INCORRECT_MESSAGE = 84; + public static final int INVALID_MANDATORY_INFORMATION = 85; + public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 86; + public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 87; + public static final int INFORMATION_ELEMENT_NON_EXISTENT = 88; + public static final int CONDITIONAL_IE_ERROR = 89; + public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 90; + public static final int RECOVERY_ON_TIMER_EXPIRED = 91; + public static final int PROTOCOL_ERROR_UNSPECIFIED = 92; + public static final int INTERWORKING_UNSPECIFIED = 93; + public static final int LOCAL_LOW_BATTERY = 94; + public static final int LOW_BATTERY = 95; + + /** EMERGENCY call failed with temporary fail cause */ + public static final int EMERGENCY_TEMP_FAILURE = 96; + /** EMERGENCY call failed with permanent fail cause */ + public static final int EMERGENCY_PERM_FAILURE = 97; + /** * Call was rejected due to number being blacklisted by user. * {@@hide} @@ -204,63 +255,14 @@ public class DisconnectCause { // 4) Update toString() with the newly added disconnect type. // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. // - // NextId: 51 + // NextId: 98 //********************************************************************************************* /** Smallest valid value for call disconnect codes. */ public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED; /** Largest valid value for call disconnect codes. */ - public static final int MAXIMUM_VALID_VALUE = HO_NOT_FEASIBLE; - public static final int NO_CIRCUIT_AVAIL = 48; - public static final int NO_ROUTE_TO_DESTINAON = 49; - public static final int OPERATOR_DETERMINED_BARRING = 50; - public static final int CALL_FAIL_NO_USER_RESPONDING = 51; - public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 52; - public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 53; - public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 54; - public static final int CHANNEL_UNACCEPTABLE = 55; - public static final int CALL_REJECTED = 56; - public static final int NUMBER_CHANGED = 57; - public static final int PREEMPTION = 58; - public static final int FACILITY_REJECTED = 59; - public static final int RESP_TO_STATUS_ENQUIRY = 60; - public static final int NORMAL_UNSPECIFIED = 61; - public static final int NETWORK_OUT_OF_ORDER = 62; - public static final int TEMPORARY_FAILURE = 63; - public static final int SWITCHING_EQUIPMENT_CONGESTION = 64; - public static final int ACCESS_INFORMATION_DISCARDED = 65; - public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 66; - public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 67; - public static final int QOS_UNAVAILABLE = 68; - public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 69; - public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 70; - public static final int BEARER_CAPABILITY_UNAVAILABLE = 71; - public static final int SERVICE_OPTION_NOT_AVAILABLE = 72; - public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 73; - public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 74; - public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 75; - public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 76; - public static final int INVALID_TRANSACTION_IDENTIFIER = 77; - public static final int USER_NOT_MEMBER_OF_CUG = 78; - public static final int INCOMPATIBLE_DESTINATION = 79; - public static final int INVALID_TRANSIT_NW_SELECTION = 80; - public static final int SEMANTICALLY_INCORRECT_MESSAGE = 81; - public static final int INVALID_MANDATORY_INFORMATION = 82; - public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 83; - public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 84; - public static final int INFORMATION_ELEMENT_NON_EXISTENT = 85; - public static final int CONDITIONAL_IE_ERROR = 86; - public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 87; - public static final int RECOVERY_ON_TIMER_EXPIRED = 88; - public static final int PROTOCOL_ERROR_UNSPECIFIED = 89; - public static final int INTERWORKING_UNSPECIFIED = 90; - public static final int LOCAL_LOW_BATTERY = 91; - public static final int LOW_BATTERY = 92; - /** EMERGENCY call failed with temporary fail cause */ - public static final int EMERGENCY_TEMP_FAILURE = 93; - /** EMERGENCY call failed with permanent fail cause */ - public static final int EMERGENCY_PERM_FAILURE = 94; + public static final int MAXIMUM_VALID_VALUE = EMERGENCY_PERM_FAILURE; /** Private constructor to avoid class instantiation. */ private DisconnectCause() { @@ -370,6 +372,100 @@ public class DisconnectCause { return "CDMA_ALREADY_ACTIVATED"; case HO_NOT_FEASIBLE: return "HO_NOT_FEASIBLE"; + case NO_CIRCUIT_AVAIL: + return "NO_CIRCUIT_AVAIL"; + case NO_ROUTE_TO_DESTINAON: + return "NO_ROUTE_TO_DESTINAON"; + case OPERATOR_DETERMINED_BARRING: + return "OPERATOR_DETERMINED_BARRING"; + case CALL_FAIL_NO_USER_RESPONDING: + return "CALL_FAIL_NO_USER_RESPONDING"; + case CALL_FAIL_NO_ANSWER_FROM_USER: + return "CALL_FAIL_NO_ANSWER_FROM_USER"; + case CALL_FAIL_DESTINATION_OUT_OF_ORDER: + return "CALL_FAIL_DESTINATION_OUT_OF_ORDER"; + case BEARER_CAPABILITY_NOT_AUTHORIZED: + return "BEARER_CAPABILITY_NOT_AUTHORIZED"; + case CHANNEL_UNACCEPTABLE: + return "CHANNEL_UNACCEPTABLE"; + case CALL_REJECTED: + return "CALL_REJECTED"; + case NUMBER_CHANGED: + return "NUMBER_CHANGED"; + case PREEMPTION: + return "PREEMPTION"; + case FACILITY_REJECTED: + return "FACILITY_REJECTED"; + case RESP_TO_STATUS_ENQUIRY: + return "RESP_TO_STATUS_ENQUIRY"; + case NORMAL_UNSPECIFIED: + return "NORMAL_UNSPECIFIED"; + case NETWORK_OUT_OF_ORDER: + return "NETWORK_OUT_OF_ORDER"; + case TEMPORARY_FAILURE: + return "TEMPORARY_FAILURE"; + case SWITCHING_EQUIPMENT_CONGESTION: + return "SWITCHING_EQUIPMENT_CONGESTION"; + case ACCESS_INFORMATION_DISCARDED: + return "ACCESS_INFORMATION_DISCARDED"; + case REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE: + return "REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE"; + case RESOURCES_UNAVAILABLE_OR_UNSPECIFIED: + return "RESOURCES_UNAVAILABLE_OR_UNSPECIFIED"; + case QOS_UNAVAILABLE: + return "QOS_UNAVAILABLE"; + case REQUESTED_FACILITY_NOT_SUBSCRIBED: + return "REQUESTED_FACILITY_NOT_SUBSCRIBED"; + case INCOMING_CALLS_BARRED_WITHIN_CUG: + return "INCOMING_CALLS_BARRED_WITHIN_CUG"; + case BEARER_CAPABILITY_UNAVAILABLE: + return "BEARER_CAPABILITY_UNAVAILABLE"; + case SERVICE_OPTION_NOT_AVAILABLE: + return "SERVICE_OPTION_NOT_AVAILABLE"; + case BEARER_SERVICE_NOT_IMPLEMENTED: + return "BEARER_SERVICE_NOT_IMPLEMENTED"; + case REQUESTED_FACILITY_NOT_IMPLEMENTED: + return "REQUESTED_FACILITY_NOT_IMPLEMENTED"; + case ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE: + return "ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE"; + case SERVICE_OR_OPTION_NOT_IMPLEMENTED: + return "SERVICE_OR_OPTION_NOT_IMPLEMENTED"; + case INVALID_TRANSACTION_IDENTIFIER: + return "INVALID_TRANSACTION_IDENTIFIER"; + case USER_NOT_MEMBER_OF_CUG: + return "USER_NOT_MEMBER_OF_CUG"; + case INCOMPATIBLE_DESTINATION: + return "INCOMPATIBLE_DESTINATION"; + case INVALID_TRANSIT_NW_SELECTION: + return "INVALID_TRANSIT_NW_SELECTION"; + case SEMANTICALLY_INCORRECT_MESSAGE: + return "SEMANTICALLY_INCORRECT_MESSAGE"; + case INVALID_MANDATORY_INFORMATION: + return "INVALID_MANDATORY_INFORMATION"; + case MESSAGE_TYPE_NON_IMPLEMENTED: + return "MESSAGE_TYPE_NON_IMPLEMENTED"; + case MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case INFORMATION_ELEMENT_NON_EXISTENT: + return "INFORMATION_ELEMENT_NON_EXISTENT"; + case CONDITIONAL_IE_ERROR: + return "CONDITIONAL_IE_ERROR"; + case MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case RECOVERY_ON_TIMER_EXPIRED: + return "RECOVERY_ON_TIMER_EXPIRED"; + case PROTOCOL_ERROR_UNSPECIFIED: + return "PROTOCOL_ERROR_UNSPECIFIED"; + case INTERWORKING_UNSPECIFIED: + return "INTERWORKING_UNSPECIFIED"; + case LOCAL_LOW_BATTERY: + return "LOCAL_LOW_BATTERY"; + case LOW_BATTERY: + return "LOW_BATTERY"; + case EMERGENCY_TEMP_FAILURE: + return "EMERGENCY_TEMP_FAILURE"; + case EMERGENCY_PERM_FAILURE: + return "EMERGENCY_PERM_FAILURE"; case CALL_BLACKLISTED: return "CALL_BLACKLISTED"; default: |