1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.telephony; 18 19 import android.annotation.FlaggedApi; 20 import android.annotation.SystemApi; 21 22 import com.android.internal.telephony.flags.Flags; 23 24 /** 25 * Contains precise disconnect call causes generated by the framework and the RIL. 26 * @hide 27 */ 28 @SystemApi 29 public final class PreciseDisconnectCause { 30 31 /** The disconnect cause is not valid (Not received a disconnect cause).*/ 32 public static final int NOT_VALID = -1; 33 /** No disconnect cause provided. Generally a local disconnect or an incoming missed call. */ 34 public static final int NO_DISCONNECT_CAUSE_AVAILABLE = 0; 35 /** 36 * The destination cannot be reached because the number, although valid, 37 * is not currently assigned. 38 */ 39 public static final int UNOBTAINABLE_NUMBER = 1; 40 /** 41 * The user cannot be reached because the network through which the call has been routed does 42 * not serve the destination desired. 43 */ 44 public static final int NO_ROUTE_TO_DESTINATION = 3; 45 /** 46 * The channel most recently identified is not acceptable to the sending entity for use in this 47 * call. 48 */ 49 public static final int CHANNEL_UNACCEPTABLE = 6; 50 /** 51 * The mobile station (MS) has tried to access a service that the MS's network operator or 52 * service provider is not prepared to allow. 53 */ 54 public static final int OPERATOR_DETERMINED_BARRING = 8; 55 /** One of the users involved in the call has requested that the call is cleared. */ 56 public static final int NORMAL = 16; 57 /** The called user is unable to accept another call. */ 58 public static final int BUSY = 17; 59 /** 60 * The user does not respond to a call establishment message with either an alerting or connect 61 * indication within the prescribed period of time allocated. 62 */ 63 public static final int NO_USER_RESPONDING = 18; 64 /** 65 * The user has provided an alerting indication but has not provided a connect indication 66 * within a prescribed period of time. 67 */ 68 public static final int NO_ANSWER_FROM_USER = 19; 69 /** The equipment sending this cause does not wish to accept this call. */ 70 public static final int CALL_REJECTED = 21; 71 /** The called number is no longer assigned. */ 72 public static final int NUMBER_CHANGED = 22; 73 /** 74 * This cause is returned to the network when a mobile station clears an active call which is 75 * being pre-empted by another call with higher precedence. 76 */ 77 public static final int PREEMPTION = 25; 78 /** 79 * The destination indicated by the mobile station cannot be reached because the interface to 80 * the destination is not functioning correctly. 81 */ 82 public static final int DESTINATION_OUT_OF_ORDER = 27; 83 /** The called party number is not a valid format or is not complete. */ 84 public static final int INVALID_NUMBER_FORMAT = 28; 85 /** The facility requested by user can not be provided by the network. */ 86 public static final int FACILITY_REJECTED = 29; 87 /** Provided in response to a STATUS ENQUIRY message. */ 88 public static final int STATUS_ENQUIRY = 30; 89 /** Reports a normal disconnect only when no other normal cause applies. */ 90 public static final int NORMAL_UNSPECIFIED = 31; 91 /** There is no channel presently available to handle the call. */ 92 public static final int NO_CIRCUIT_AVAIL = 34; 93 /** 94 * The network is not functioning correctly and that the condition is likely to last a 95 * relatively long period of time. 96 */ 97 public static final int NETWORK_OUT_OF_ORDER = 38; 98 /** 99 * The network is not functioning correctly and the condition is not likely to last a long 100 * period of time. 101 */ 102 public static final int TEMPORARY_FAILURE = 41; 103 /** The switching equipment is experiencing a period of high traffic. */ 104 public static final int SWITCHING_CONGESTION = 42; 105 /** The network could not deliver access information to the remote user as requested. */ 106 public static final int ACCESS_INFORMATION_DISCARDED = 43; 107 /** The channel cannot be provided. */ 108 public static final int CHANNEL_NOT_AVAIL = 44; 109 /** 110 * This cause is used to report a resource unavailable event only when no other cause in the 111 * resource unavailable class applies. 112 */ 113 public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47; 114 /** The requested quality of service (ITU-T X.213) cannot be provided. */ 115 public static final int QOS_NOT_AVAIL = 49; 116 /** 117 * The facility could not be provided by the network because the user has no complete 118 * subscription. 119 */ 120 public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 50; 121 /** Incoming calls are not allowed within this calling user group (CUG). */ 122 public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 55; 123 /** The mobile station is not authorized to use bearer capability requested. */ 124 public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 57; 125 /** The requested bearer capability is not available at this time. */ 126 public static final int BEARER_NOT_AVAIL = 58; 127 /** The service option is not available at this time. */ 128 public static final int SERVICE_OPTION_NOT_AVAILABLE = 63; 129 /** The equipment sending this cause does not support the bearer capability requested. */ 130 public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 65; 131 /** The call clearing is due to ACM being greater than or equal to ACMmax. */ 132 public static final int ACM_LIMIT_EXCEEDED = 68; 133 /** The equipment sending this cause does not support the requested facility. */ 134 public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 69; 135 /** 136 * The equipment sending this cause only supports the restricted version of the requested bearer 137 * capability. 138 */ 139 public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70; 140 /** The service requested is not implemented at network. */ 141 public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79; 142 /** 143 * The equipment sending this cause has received a message with a transaction identifier 144 * which is not currently in use on the mobile station network interface. 145 */ 146 public static final int INVALID_TRANSACTION_IDENTIFIER = 81; 147 /** 148 * The called user for the incoming CUG call is not a member of the specified calling user 149 * group (CUG). 150 */ 151 public static final int USER_NOT_MEMBER_OF_CUG = 87; 152 /** The equipment sending this cause has received a request which can't be accomodated. */ 153 public static final int INCOMPATIBLE_DESTINATION = 88; 154 /** This cause is used to report receipt of a message with semantically incorrect contents. */ 155 public static final int SEMANTICALLY_INCORRECT_MESSAGE = 95; 156 /** 157 * The equipment sending this cause has received a message with a non-semantical mandatory 158 * information element (IE) error. 159 */ 160 public static final int INVALID_MANDATORY_INFORMATION = 96; 161 /** 162 * This is sent in response to a message which is not defined, or defined but not implemented 163 * by the equipment sending this cause. 164 */ 165 public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 97; 166 /** 167 * The equipment sending this cause has received a message not compatible with the protocol 168 * state. 169 */ 170 public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98; 171 /** 172 * The equipment sending this cause has received a message which includes information 173 * elements not recognized because its identifier is not defined or it is defined but not 174 * implemented by the equipment sending the cause. 175 */ 176 public static final int INFORMATION_ELEMENT_NON_EXISTENT = 99; 177 /** The equipment sending this cause has received a message with conditional IE errors. */ 178 public static final int CONDITIONAL_IE_ERROR = 100; 179 /** The message has been received which is incompatible with the protocol state. */ 180 public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101; 181 /** 182 * The procedure has been initiated by the expiry of a timer in association with 183 * 3GPP TS 24.008 error handling procedures. 184 */ 185 public static final int RECOVERY_ON_TIMER_EXPIRED = 102; 186 /** 187 * This protocol error event is reported only when no other cause in the protocol error class 188 * applies. 189 */ 190 public static final int PROTOCOL_ERROR_UNSPECIFIED = 111; 191 /** 192 * Interworking with a network which does not provide causes for actions it takes thus, the 193 * precise cause for a message which is being sent cannot be ascertained. 194 */ 195 public static final int INTERWORKING_UNSPECIFIED = 127; 196 /** The call is restricted. */ 197 public static final int CALL_BARRED = 240; 198 /** The call is blocked by the Fixed Dialing Number list. */ 199 public static final int FDN_BLOCKED = 241; 200 /** The given IMSI is not known at the Visitor Location Register (VLR) TS 24.008 cause . */ 201 public static final int IMSI_UNKNOWN_IN_VLR = 242; 202 /** 203 * The network does not accept emergency call establishment using an IMEI or not accept attach 204 * procedure for emergency services using an IMEI. 205 */ 206 public static final int IMEI_NOT_ACCEPTED = 243; 207 /** The call cannot be established because RADIO is OFF. */ 208 public static final int RADIO_OFF = 247; 209 /** The call cannot be established because of no cell coverage. */ 210 public static final int OUT_OF_SRV = 248; 211 /** The call cannot be established because of no valid SIM. */ 212 public static final int NO_VALID_SIM = 249; 213 /** The call is dropped or failed internally by modem. */ 214 public static final int RADIO_INTERNAL_ERROR = 250; 215 /** Call failed because of UE timer expired while waiting for a response from network. */ 216 public static final int NETWORK_RESP_TIMEOUT = 251; 217 /** Call failed because of a network reject. */ 218 public static final int NETWORK_REJECT = 252; 219 /** Call failed because of radio access failure. ex. RACH failure. */ 220 public static final int RADIO_ACCESS_FAILURE = 253; 221 /** Call failed/dropped because of a Radio Link Failure (RLF). */ 222 public static final int RADIO_LINK_FAILURE = 254; 223 /** Call failed/dropped because of radio link lost. */ 224 public static final int RADIO_LINK_LOST = 255; 225 /** Call failed because of a radio uplink issue. */ 226 public static final int RADIO_UPLINK_FAILURE = 256; 227 /** Call failed because of a RRC (Radio Resource Control) connection setup failure. */ 228 public static final int RADIO_SETUP_FAILURE = 257; 229 /** Call failed/dropped because of RRC (Radio Resource Control) connection release from NW. */ 230 public static final int RADIO_RELEASE_NORMAL = 258; 231 /** 232 * Call failed/dropped because of RRC (Radio Resource Control) abnormally released by 233 * modem/network. 234 */ 235 public static final int RADIO_RELEASE_ABNORMAL = 259; 236 /** Call setup failed because of access class barring. */ 237 public static final int ACCESS_CLASS_BLOCKED = 260; 238 /** Call failed/dropped because of a network detach. */ 239 public static final int NETWORK_DETACH = 261; 240 241 /** 242 * Dialing emergency calls is currently unavailable. 243 * The call should be redialed on the other subscription silently. 244 * If there are no other subscriptions available then the call may be redialed 245 * on this subscription again. 246 */ 247 @FlaggedApi(Flags.FLAG_USE_OEM_DOMAIN_SELECTION_SERVICE) 248 public static final int EMERGENCY_TEMP_FAILURE = 325; 249 /** 250 * Dialing emergency calls is currently unavailable. 251 * The call should be redialed on the other subscription silently. 252 * If there are no other subscriptions available then the call should not 253 * be redialed on this subscription again. 254 */ 255 @FlaggedApi(Flags.FLAG_USE_OEM_DOMAIN_SELECTION_SERVICE) 256 public static final int EMERGENCY_PERM_FAILURE = 326; 257 258 /** Mobile station (MS) is locked until next power cycle. */ 259 public static final int CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; 260 /** Drop call. */ 261 public static final int CDMA_DROP = 1001; 262 /** INTERCEPT order received, Mobile station (MS) state idle entered. */ 263 public static final int CDMA_INTERCEPT = 1002; 264 /** Mobile station (MS) has been redirected, call is cancelled. */ 265 public static final int CDMA_REORDER = 1003; 266 /** Service option rejection. */ 267 public static final int CDMA_SO_REJECT = 1004; 268 /** Requested service is rejected, retry delay is set. */ 269 public static final int CDMA_RETRY_ORDER = 1005; 270 /** Unable to obtain access to the CDMA system. */ 271 public static final int CDMA_ACCESS_FAILURE = 1006; 272 /** Not a preempted call. */ 273 public static final int CDMA_PREEMPTED = 1007; 274 /** Not an emergency call. */ 275 public static final int CDMA_NOT_EMERGENCY = 1008; 276 /** Access Blocked by CDMA network. */ 277 public static final int CDMA_ACCESS_BLOCKED = 1009; 278 279 /* OEM specific error codes. To be used by OEMs when they don't want to 280 reveal error code which would be replaced by ERROR_UNSPECIFIED */ 281 public static final int OEM_CAUSE_1 = 0xf001; 282 public static final int OEM_CAUSE_2 = 0xf002; 283 public static final int OEM_CAUSE_3 = 0xf003; 284 public static final int OEM_CAUSE_4 = 0xf004; 285 public static final int OEM_CAUSE_5 = 0xf005; 286 public static final int OEM_CAUSE_6 = 0xf006; 287 public static final int OEM_CAUSE_7 = 0xf007; 288 public static final int OEM_CAUSE_8 = 0xf008; 289 public static final int OEM_CAUSE_9 = 0xf009; 290 public static final int OEM_CAUSE_10 = 0xf00a; 291 public static final int OEM_CAUSE_11 = 0xf00b; 292 public static final int OEM_CAUSE_12 = 0xf00c; 293 public static final int OEM_CAUSE_13 = 0xf00d; 294 public static final int OEM_CAUSE_14 = 0xf00e; 295 public static final int OEM_CAUSE_15 = 0xf00f; 296 297 /** Disconnected due to unspecified reasons. */ 298 public static final int ERROR_UNSPECIFIED = 0xffff; 299 300 /** Private constructor to avoid class instantiation. */ PreciseDisconnectCause()301 private PreciseDisconnectCause() { 302 // Do nothing. 303 } 304 } 305