• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package 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  */
26 public 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      * <p>Broadcast Action: The emergency callback mode is changed.
80      * <ul>
81      *   <li><em>phoneinECMState</em> - A boolean value,true=phone in ECM, false=ECM off</li>
82      * </ul>
83      * <p class="note">
84      * You can <em>not</em> receive this through components declared
85      * in manifests, only by explicitly registering for it with
86      * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver,
87      * android.content.IntentFilter) Context.registerReceiver()}.
88      *
89      * <p class="note">
90      * Requires no permission.
91      *
92      * <p class="note">This is a protected intent that can only be sent
93      * by the system.
94      */
95     public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED
96             = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED";
97     /**
98      * Broadcast Action: The phone's signal strength has changed. The intent will have the
99      * following extra values:</p>
100      * <ul>
101      *   <li><em>phoneName</em> - A string version of the phone name.</li>
102      *   <li><em>asu</em> - A numeric value for the signal strength.
103      *          An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu).
104      *          The following special values are defined:
105      *          <ul><li>0 means "-113 dBm or less".</li><li>31 means "-51 dBm or greater".</li></ul>
106      *   </li>
107      * </ul>
108      *
109      * <p class="note">
110      * You can <em>not</em> receive this through components declared
111      * in manifests, only by exlicitly registering for it with
112      * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver,
113      * android.content.IntentFilter) Context.registerReceiver()}.
114      *
115      * <p class="note">
116      * Requires the READ_PHONE_STATE permission.
117      *
118      * <p class="note">This is a protected intent that can only be sent
119      * by the system.
120      */
121     public static final String ACTION_SIGNAL_STRENGTH_CHANGED = "android.intent.action.SIG_STR";
122 
123 
124     /**
125      * Broadcast Action: The data connection state has changed for any one of the
126      * phone's mobile data connections (eg, default, MMS or GPS specific connection).
127      * The intent will have the following extra values:</p>
128      * <ul>
129      *   <li><em>phoneName</em> - A string version of the phone name.</li>
130      *   <li><em>state</em> - One of <code>"CONNECTED"</code>
131      *      <code>"CONNECTING"</code> or <code>"DISCONNNECTED"</code></li>
132      *   <li><em>apn</em> - A string that is the APN associated with this
133      *      connection.</li>
134      *   <li><em>apnType</em> - A string array of APN types associated with
135      *      this connection.  The APN type <code>"*"</code> is a special
136      *      type that means this APN services all types.</li>
137      * </ul>
138      *
139      * <p class="note">
140      * Requires the READ_PHONE_STATE permission.
141      *
142      * <p class="note">This is a protected intent that can only be sent
143      * by the system.
144      */
145     public static final String ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
146             = "android.intent.action.ANY_DATA_STATE";
147 
148 
149     /**
150      * Broadcast Action: An attempt to establish a data connection has failed.
151      * The intent will have the following extra values:</p>
152      * <ul>
153      *   <li><em>phoneName</em> &mdash A string version of the phone name.</li>
154      *   <li><em>state</em> &mdash; One of <code>"CONNECTED"</code>
155      *      <code>"CONNECTING"</code> or <code>"DISCONNNECTED"</code></li>
156      * <li><em>reason</em> &mdash; A string indicating the reason for the failure, if available</li>
157      * </ul>
158      *
159      * <p class="note">
160      * Requires the READ_PHONE_STATE permission.
161      *
162      * <p class="note">This is a protected intent that can only be sent
163      * by the system.
164      */
165     public static final String ACTION_DATA_CONNECTION_FAILED
166             = "android.intent.action.DATA_CONNECTION_FAILED";
167 
168 
169     /**
170      * Broadcast Action: The sim card state has changed.
171      * The intent will have the following extra values:</p>
172      * <ul>
173      *   <li><em>phoneName</em> - A string version of the phone name.</li>
174      *   <li><em>ss</em> - The sim state.  One of
175      *   <code>"ABSENT"</code> <code>"LOCKED"</code>
176      *   <code>"READY"</code> <code>"ISMI"</code> <code>"LOADED"</code> </li>
177      *   <li><em>reason</em> - The reason while ss is LOCKED, otherwise is null
178      *   <code>"PIN"</code> locked on PIN1
179      *   <code>"PUK"</code> locked on PUK1
180      *   <code>"NETWORK"</code> locked on Network Personalization </li>
181      * </ul>
182      *
183      * <p class="note">
184      * Requires the READ_PHONE_STATE permission.
185      *
186      * <p class="note">This is a protected intent that can only be sent
187      * by the system.
188      */
189     public static final String ACTION_SIM_STATE_CHANGED
190             = "android.intent.action.SIM_STATE_CHANGED";
191 
192 
193     /**
194      * Broadcast Action: The time was set by the carrier (typically by the NITZ string).
195      * This is a sticky broadcast.
196      * The intent will have the following extra values:</p>
197      * <ul>
198      *   <li><em>time</em> - The time as a long in UTC milliseconds.</li>
199      * </ul>
200      *
201      * <p class="note">
202      * Requires the READ_PHONE_STATE permission.
203      *
204      * <p class="note">This is a protected intent that can only be sent
205      * by the system.
206      */
207     public static final String ACTION_NETWORK_SET_TIME = "android.intent.action.NETWORK_SET_TIME";
208 
209 
210     /**
211      * Broadcast Action: The timezone was set by the carrier (typically by the NITZ string).
212      * This is a sticky broadcast.
213      * The intent will have the following extra values:</p>
214      * <ul>
215      *   <li><em>time-zone</em> - The java.util.TimeZone.getID() value identifying the new time
216      *          zone.</li>
217      * </ul>
218      *
219      * <p class="note">
220      * Requires the READ_PHONE_STATE permission.
221      *
222      * <p class="note">This is a protected intent that can only be sent
223      * by the system.
224      */
225     public static final String ACTION_NETWORK_SET_TIMEZONE
226             = "android.intent.action.NETWORK_SET_TIMEZONE";
227 
228     /**
229      * <p>Broadcast Action: It indicates the Emergency callback mode blocks datacall/sms
230      * <p class="note">.
231      * This is to pop up a notice to show user that the phone is in emergency callback mode
232      * and atacalls and outgoing sms are blocked.
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_SHOW_NOTICE_ECM_BLOCK_OTHERS
238             = "android.intent.action.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS";
239 }
240