TelephonyIntents.java revision 0c0814839fc442618313276dd0e46711d81c5773
1/* 2 * Copyright (C) 2008 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 17package com.android.internal.telephony; 18 19/** 20 * The intents that the telephony services broadcast. 21 * 22 * <p class="warning"> 23 * THESE ARE NOT THE API! Use the {@link android.telephony.TelephonyManager} class. 24 * DON'T LISTEN TO THESE DIRECTLY. 25 */ 26public class TelephonyIntents { 27 28 /** 29 * Broadcast Action: The phone service state has changed. The intent will have the following 30 * extra values:</p> 31 * <ul> 32 * <li><em>state</em> - An int with one of the following values: 33 * {@link android.telephony.ServiceState#STATE_IN_SERVICE}, 34 * {@link android.telephony.ServiceState#STATE_OUT_OF_SERVICE}, 35 * {@link android.telephony.ServiceState#STATE_EMERGENCY_ONLY} 36 * or {@link android.telephony.ServiceState#STATE_POWER_OFF} 37 * <li><em>roaming</em> - A boolean value indicating whether the phone is roaming.</li> 38 * <li><em>operator-alpha-long</em> - The carrier name as a string.</li> 39 * <li><em>operator-alpha-short</em> - A potentially shortened version of the carrier name, 40 * as a string.</li> 41 * <li><em>operator-numeric</em> - A number representing the carrier, as a string. This is 42 * a five or six digit number consisting of the MCC (Mobile Country Code, 3 digits) 43 * and MNC (Mobile Network code, 2-3 digits).</li> 44 * <li><em>manual</em> - A boolean, where true indicates that the user has chosen to select 45 * the network manually, and false indicates that network selection is handled by the 46 * phone.</li> 47 * </ul> 48 * 49 * <p class="note"> 50 * Requires the READ_PHONE_STATE permission. 51 * 52 * <p class="note">This is a protected intent that can only be sent 53 * by the system. 54 */ 55 public static final String ACTION_SERVICE_STATE_CHANGED = "android.intent.action.SERVICE_STATE"; 56 57 /** 58 * <p>Broadcast Action: The radio technology has changed. The intent will have the following 59 * extra values:</p> 60 * <ul> 61 * <li><em>phoneName</em> - A string version of the new phone name.</li> 62 * </ul> 63 * 64 * <p class="note"> 65 * You can <em>not</em> receive this through components declared 66 * in manifests, only by explicitly registering for it with 67 * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, 68 * android.content.IntentFilter) Context.registerReceiver()}. 69 * 70 * <p class="note"> 71 * Requires no permission. 72 * 73 * <p class="note">This is a protected intent that can only be sent 74 * by the system. 75 */ 76 public static final String ACTION_RADIO_TECHNOLOGY_CHANGED 77 = "android.intent.action.RADIO_TECHNOLOGY"; 78 79 /** 80 * <p>Broadcast Action: The emergency callback mode is changed. 81 * <ul> 82 * <li><em>phoneinECMState</em> - A boolean value,true=phone in ECM, false=ECM off</li> 83 * </ul> 84 * <p class="note"> 85 * You can <em>not</em> receive this through components declared 86 * in manifests, only by explicitly registering for it with 87 * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, 88 * android.content.IntentFilter) Context.registerReceiver()}. 89 * 90 * <p class="note"> 91 * Requires no permission. 92 * 93 * <p class="note">This is a protected intent that can only be sent 94 * by the system. 95 */ 96 public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED 97 = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED"; 98 99 /** 100 * <p>Broadcast Action: The emergency call state is changed. 101 * <ul> 102 * <li><em>phoneInEmergencyCall</em> - A boolean value, true if phone in emergency call, 103 * false otherwise</li> 104 * </ul> 105 * <p class="note"> 106 * You can <em>not</em> receive this through components declared 107 * in manifests, only by explicitly registering for it with 108 * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, 109 * android.content.IntentFilter) Context.registerReceiver()}. 110 * 111 * <p class="note"> 112 * Requires no permission. 113 * 114 * <p class="note">This is a protected intent that can only be sent 115 * by the system. 116 */ 117 public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED 118 = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED"; 119 120 /** 121 * Broadcast Action: The phone's signal strength has changed. The intent will have the 122 * following extra values:</p> 123 * <ul> 124 * <li><em>phoneName</em> - A string version of the phone name.</li> 125 * <li><em>asu</em> - A numeric value for the signal strength. 126 * An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu). 127 * The following special values are defined: 128 * <ul><li>0 means "-113 dBm or less".</li><li>31 means "-51 dBm or greater".</li></ul> 129 * </li> 130 * </ul> 131 * 132 * <p class="note"> 133 * You can <em>not</em> receive this through components declared 134 * in manifests, only by exlicitly registering for it with 135 * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, 136 * android.content.IntentFilter) Context.registerReceiver()}. 137 * 138 * <p class="note"> 139 * Requires the READ_PHONE_STATE permission. 140 * 141 * <p class="note">This is a protected intent that can only be sent 142 * by the system. 143 */ 144 public static final String ACTION_SIGNAL_STRENGTH_CHANGED = "android.intent.action.SIG_STR"; 145 146 147 /** 148 * Broadcast Action: The data connection state has changed for any one of the 149 * phone's mobile data connections (eg, default, MMS or GPS specific connection). 150 * The intent will have the following extra values:</p> 151 * <dl> 152 * <dt>phoneName</dt><dd>A string version of the phone name.</dd> 153 * <dt>state</dt><dd>One of {@code CONNECTED}, {@code CONNECTING}, 154 * or {@code DISCONNECTED}.</dd> 155 * <dt>apn</dt><dd>A string that is the APN associated with this connection.</dd> 156 * <dt>apnType</dt><dd>A string array of APN types associated with this connection. 157 * The APN type {@code *} is a special type that means this APN services all types.</dd> 158 * </dl> 159 * 160 * <p class="note"> 161 * Requires the READ_PHONE_STATE permission. 162 * 163 * <p class="note">This is a protected intent that can only be sent 164 * by the system. 165 */ 166 public static final String ACTION_ANY_DATA_CONNECTION_STATE_CHANGED 167 = "android.intent.action.ANY_DATA_STATE"; 168 169 /** 170 * Broadcast Action: Occurs when a data connection connects to a provisioning apn 171 * and is broadcast by the low level data connection code. 172 * The intent will have the following extra values:</p> 173 * <dl> 174 * <dt>apn</dt><dd>A string that is the APN associated with this connection.</dd> 175 * <dt>apnType</dt><dd>A string array of APN types associated with this connection. 176 * The APN type {@code *} is a special type that means this APN services all types.</dd> 177 * <dt>linkProperties</dt><dd>{@code LinkProperties} for this APN.</dd> 178 * <dt>linkCapabilities</dt><dd>The {@code LinkCapabilities} for this APN.</dd> 179 * <dt>iface</dt><dd>A string that is the name of the interface.</dd> 180 * </dl> 181 * 182 * <p class="note"> 183 * Requires the READ_PHONE_STATE permission. 184 * 185 * <p class="note">This is a protected intent that can only be sent 186 * by the system. 187 */ 188 public static final String ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN 189 = "android.intent.action.DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN"; 190 191 /** 192 * Broadcast Action: An attempt to establish a data connection has failed. 193 * The intent will have the following extra values:</p> 194 * <dl> 195 * <dt>phoneName</dt><dd>A string version of the phone name.</dd> 196 * <dt>state</dt><dd>One of {@code CONNECTED}, {@code CONNECTING}, or {code DISCONNECTED}.</dd> 197 * <dt>reason</dt><dd>A string indicating the reason for the failure, if available.</dd> 198 * </dl> 199 * 200 * <p class="note"> 201 * Requires the READ_PHONE_STATE permission. 202 * 203 * <p class="note">This is a protected intent that can only be sent 204 * by the system. 205 */ 206 public static final String ACTION_DATA_CONNECTION_FAILED 207 = "android.intent.action.DATA_CONNECTION_FAILED"; 208 209 210 /** 211 * Broadcast Action: The sim card state has changed. 212 * The intent will have the following extra values:</p> 213 * <dl> 214 * <dt>phoneName</dt><dd>A string version of the phone name.</dd> 215 * <dt>ss</dt><dd>The sim state. One of: 216 * <dl> 217 * <dt>{@code ABSENT}</dt><dd>SIM card not found</dd> 218 * <dt>{@code LOCKED}</dt><dd>SIM card locked (see {@code reason})</dd> 219 * <dt>{@code READY}</dt><dd>SIM card ready</dd> 220 * <dt>{@code IMSI}</dt><dd>FIXME: what is this state?</dd> 221 * <dt>{@code LOADED}</dt><dd>SIM card data loaded</dd> 222 * </dl></dd> 223 * <dt>reason</dt><dd>The reason why ss is {@code LOCKED}; null otherwise.</dd> 224 * <dl> 225 * <dt>{@code PIN}</dt><dd>locked on PIN1</dd> 226 * <dt>{@code PUK}</dt><dd>locked on PUK1</dd> 227 * <dt>{@code NETWORK}</dt><dd>locked on network personalization</dd> 228 * </dl> 229 * </dl> 230 * 231 * <p class="note"> 232 * Requires the READ_PHONE_STATE permission. 233 * 234 * <p class="note">This is a protected intent that can only be sent 235 * by the system. 236 */ 237 public static final String ACTION_SIM_STATE_CHANGED 238 = "android.intent.action.SIM_STATE_CHANGED"; 239 240 241 /** 242 * Broadcast Action: The time was set by the carrier (typically by the NITZ string). 243 * This is a sticky broadcast. 244 * The intent will have the following extra values:</p> 245 * <ul> 246 * <li><em>time</em> - The time as a long in UTC milliseconds.</li> 247 * </ul> 248 * 249 * <p class="note"> 250 * Requires the READ_PHONE_STATE permission. 251 * 252 * <p class="note">This is a protected intent that can only be sent 253 * by the system. 254 */ 255 public static final String ACTION_NETWORK_SET_TIME = "android.intent.action.NETWORK_SET_TIME"; 256 257 258 /** 259 * Broadcast Action: The timezone was set by the carrier (typically by the NITZ string). 260 * This is a sticky broadcast. 261 * The intent will have the following extra values:</p> 262 * <ul> 263 * <li><em>time-zone</em> - The java.util.TimeZone.getID() value identifying the new time 264 * zone.</li> 265 * </ul> 266 * 267 * <p class="note"> 268 * Requires the READ_PHONE_STATE permission. 269 * 270 * <p class="note">This is a protected intent that can only be sent 271 * by the system. 272 */ 273 public static final String ACTION_NETWORK_SET_TIMEZONE 274 = "android.intent.action.NETWORK_SET_TIMEZONE"; 275 276 /** 277 * <p>Broadcast Action: It indicates the Emergency callback mode blocks datacall/sms 278 * <p class="note">. 279 * This is to pop up a notice to show user that the phone is in emergency callback mode 280 * and atacalls and outgoing sms are blocked. 281 * 282 * <p class="note">This is a protected intent that can only be sent 283 * by the system. 284 */ 285 public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS 286 = "android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS"; 287 288 /** 289 * Activity Action: Start this activity to invoke the carrier setup app. 290 * The carrier app must be signed using a certificate that matches the UICC access rules. 291 * 292 * <p class="note">Callers of this should hold the android.permission.INVOKE_CARRIER_SETUP 293 * permission.</p> 294 */ 295 public static final String ACTION_CARRIER_SETUP = "android.intent.action.ACTION_CARRIER_SETUP"; 296 297 /** 298 * <p>Broadcast Action: Indicates that the action is forbidden by network. 299 * <p class="note"> 300 * This is for the OEM applications to understand about possible provisioning issues. 301 * Used in OMA-DM applications. 302 */ 303 public static final String ACTION_FORBIDDEN_NO_SERVICE_AUTHORIZATION 304 = "android.intent.action.ACTION_FORBIDDEN_NO_SERVICE_AUTHORIZATION"; 305 306 /** 307 * Broadcast Action: A "secret code" has been entered in the dialer. Secret codes are 308 * of the form {@code *#*#<code>#*#*}. The intent will have the data URI: 309 * 310 * {@code android_secret_code://<code>} 311 */ 312 public static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE"; 313 314 /** 315 * Broadcast Action: The Service Provider string(s) have been updated. Activities or 316 * services that use these strings should update their display. 317 * The intent will have the following extra values:</p> 318 * 319 * <dl> 320 * <dt>showPlmn</dt><dd>Boolean that indicates whether the PLMN should be shown.</dd> 321 * <dt>plmn</dt><dd>The operator name of the registered network, as a string.</dd> 322 * <dt>showSpn</dt><dd>Boolean that indicates whether the SPN should be shown.</dd> 323 * <dt>spn</dt><dd>The service provider name, as a string.</dd> 324 * </dl> 325 * 326 * Note that <em>showPlmn</em> may indicate that <em>plmn</em> should be displayed, even 327 * though the value for <em>plmn</em> is null. This can happen, for example, if the phone 328 * has not registered to a network yet. In this case the receiver may substitute an 329 * appropriate placeholder string (eg, "No service"). 330 * 331 * It is recommended to display <em>plmn</em> before / above <em>spn</em> if 332 * both are displayed. 333 * 334 * <p>Note: this is a protected intent that can only be sent by the system. 335 */ 336 public static final String SPN_STRINGS_UPDATED_ACTION = 337 "android.provider.Telephony.SPN_STRINGS_UPDATED"; 338 339 public static final String EXTRA_SHOW_PLMN = "showPlmn"; 340 public static final String EXTRA_PLMN = "plmn"; 341 public static final String EXTRA_SHOW_SPN = "showSpn"; 342 public static final String EXTRA_SPN = "spn"; 343 public static final String EXTRA_DATA_SPN = "spnData"; 344 345 /** 346 * <p>Broadcast Action: It indicates one column of a subinfo record has been changed 347 * <p class="note">This is a protected intent that can only be sent 348 * by the system. 349 */ 350 public static final String ACTION_SUBINFO_CONTENT_CHANGE 351 = "android.intent.action.ACTION_SUBINFO_CONTENT_CHANGE"; 352 353 /** 354 * <p>Broadcast Action: It indicates subinfo record update is completed 355 * when SIM inserted state change 356 * <p class="note">This is a protected intent that can only be sent 357 * by the system. 358 */ 359 public static final String ACTION_SUBINFO_RECORD_UPDATED 360 = "android.intent.action.ACTION_SUBINFO_RECORD_UPDATED"; 361 362 /** 363 * Broadcast Action: The default subscription has changed. This has the following 364 * extra values:</p> 365 * <ul> 366 * <li><em>subscription</em> - A int, the current default subscription.</li> 367 * </ul> 368 */ 369 public static final String ACTION_DEFAULT_SUBSCRIPTION_CHANGED 370 = "android.intent.action.ACTION_DEFAULT_SUBSCRIPTION_CHANGED"; 371 372 /** 373 * Broadcast Action: The default data subscription has changed. This has the following 374 * extra values:</p> 375 * <ul> 376 * <li><em>subscription</em> - A int, the current data default subscription.</li> 377 * </ul> 378 */ 379 public static final String ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED 380 = "android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED"; 381 382 /** 383 * Broadcast Action: The default voice subscription has changed. This has the following 384 * extra values:</p> 385 * <ul> 386 * <li><em>subscription</em> - A int, the current voice default subscription.</li> 387 * </ul> 388 */ 389 public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED 390 = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED"; 391 392 /** 393 * Broadcast Action: The default sms subscription has changed. This has the following 394 * extra values:</p> 395 * <ul> 396 * <li><em>subscription</em> - A int, the current sms default subscription.</li> 397 * </ul> 398 */ 399 public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED 400 = "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED"; 401 402 /* 403 * Broadcast Action: An attempt to set phone radio type and access technology has changed. 404 * This has the following extra values: 405 * <ul> 406 * <li><em>phones radio access family </em> - A RadioAccessFamily 407 * array, contain phone ID and new radio access family for each phone.</li> 408 * </ul> 409 */ 410 public static final String ACTION_SET_RADIO_CAPABILITY_DONE = 411 "android.intent.action.ACTION_SET_RADIO_CAPABILITY_DONE"; 412 413 public static final String EXTRA_RADIO_ACCESS_FAMILY = "rafs"; 414 415 /* 416 * Broadcast Action: An attempt to set phone radio access family has failed. 417 */ 418 public static final String ACTION_SET_RADIO_CAPABILITY_FAILED = 419 "android.intent.action.ACTION_SET_RADIO_CAPABILITY_FAILED"; 420} 421