The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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 android.net; |
| 18 | |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 19 | import android.annotation.UnsupportedAppUsage; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | import android.os.Parcel; |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 21 | import android.os.Parcelable; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | |
Jeff Sharkey | 836ecb5 | 2013-01-03 11:21:24 -0800 | [diff] [blame] | 23 | import com.android.internal.annotations.VisibleForTesting; |
| 24 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | import java.util.EnumMap; |
| 26 | |
| 27 | /** |
Scott Main | 671644c | 2011-10-06 19:02:28 -0700 | [diff] [blame] | 28 | * Describes the status of a network interface. |
| 29 | * <p>Use {@link ConnectivityManager#getActiveNetworkInfo()} to get an instance that represents |
| 30 | * the current network connection. |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 31 | * |
| 32 | * @deprecated Callers should instead use the {@link ConnectivityManager.NetworkCallback} API to |
| 33 | * learn about connectivity changes, or switch to use |
| 34 | * {@link ConnectivityManager#getNetworkCapabilities} or |
| 35 | * {@link ConnectivityManager#getLinkProperties} to get information synchronously. Keep |
| 36 | * in mind that while callbacks are guaranteed to be called for every event in order, |
| 37 | * synchronous calls have no such constraints, and as such it is unadvisable to use the |
| 38 | * synchronous methods inside the callbacks as they will often not offer a view of |
| 39 | * networking that is consistent (that is: they may return a past or a future state with |
| 40 | * respect to the event being processed by the callback). Instead, callers are advised |
| 41 | * to only use the arguments of the callbacks, possibly memorizing the specific bits of |
| 42 | * information they need to keep from one callback to another. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | */ |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 44 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 45 | public class NetworkInfo implements Parcelable { |
| 46 | |
| 47 | /** |
| 48 | * Coarse-grained network state. This is probably what most applications should |
| 49 | * use, rather than {@link android.net.NetworkInfo.DetailedState DetailedState}. |
| 50 | * The mapping between the two is as follows: |
| 51 | * <br/><br/> |
| 52 | * <table> |
| 53 | * <tr><td><b>Detailed state</b></td><td><b>Coarse-grained state</b></td></tr> |
| 54 | * <tr><td><code>IDLE</code></td><td><code>DISCONNECTED</code></td></tr> |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 55 | * <tr><td><code>SCANNING</code></td><td><code>DISCONNECTED</code></td></tr> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 56 | * <tr><td><code>CONNECTING</code></td><td><code>CONNECTING</code></td></tr> |
| 57 | * <tr><td><code>AUTHENTICATING</code></td><td><code>CONNECTING</code></td></tr> |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 58 | * <tr><td><code>OBTAINING_IPADDR</code></td><td><code>CONNECTING</code></td></tr> |
| 59 | * <tr><td><code>VERIFYING_POOR_LINK</code></td><td><code>CONNECTING</code></td></tr> |
| 60 | * <tr><td><code>CAPTIVE_PORTAL_CHECK</code></td><td><code>CONNECTING</code></td></tr> |
Scott Main | 671644c | 2011-10-06 19:02:28 -0700 | [diff] [blame] | 61 | * <tr><td><code>CONNECTED</code></td><td><code>CONNECTED</code></td></tr> |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 62 | * <tr><td><code>SUSPENDED</code></td><td><code>SUSPENDED</code></td></tr> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | * <tr><td><code>DISCONNECTING</code></td><td><code>DISCONNECTING</code></td></tr> |
| 64 | * <tr><td><code>DISCONNECTED</code></td><td><code>DISCONNECTED</code></td></tr> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 65 | * <tr><td><code>FAILED</code></td><td><code>DISCONNECTED</code></td></tr> |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 66 | * <tr><td><code>BLOCKED</code></td><td><code>DISCONNECTED</code></td></tr> |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | * </table> |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 68 | * |
| 69 | * @deprecated See {@link NetworkInfo}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 70 | */ |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 71 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 72 | public enum State { |
| 73 | CONNECTING, CONNECTED, SUSPENDED, DISCONNECTING, DISCONNECTED, UNKNOWN |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * The fine-grained state of a network connection. This level of detail |
| 78 | * is probably of interest to few applications. Most should use |
| 79 | * {@link android.net.NetworkInfo.State State} instead. |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 80 | * |
| 81 | * @deprecated See {@link NetworkInfo}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 82 | */ |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 83 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 84 | public enum DetailedState { |
| 85 | /** Ready to start data connection setup. */ |
| 86 | IDLE, |
| 87 | /** Searching for an available access point. */ |
| 88 | SCANNING, |
| 89 | /** Currently setting up data connection. */ |
| 90 | CONNECTING, |
| 91 | /** Network link established, performing authentication. */ |
| 92 | AUTHENTICATING, |
| 93 | /** Awaiting response from DHCP server in order to assign IP address information. */ |
| 94 | OBTAINING_IPADDR, |
| 95 | /** IP traffic should be available. */ |
| 96 | CONNECTED, |
| 97 | /** IP traffic is suspended */ |
| 98 | SUSPENDED, |
| 99 | /** Currently tearing down data connection. */ |
| 100 | DISCONNECTING, |
| 101 | /** IP traffic not available. */ |
| 102 | DISCONNECTED, |
| 103 | /** Attempt to connect failed. */ |
Jeff Sharkey | c006f1a | 2011-05-19 17:12:49 -0700 | [diff] [blame] | 104 | FAILED, |
| 105 | /** Access to this network is blocked. */ |
Irfan Sheriff | 07573b3 | 2012-01-27 21:00:19 -0800 | [diff] [blame] | 106 | BLOCKED, |
| 107 | /** Link has poor connectivity. */ |
Irfan Sheriff | da6da09 | 2012-08-16 12:49:23 -0700 | [diff] [blame] | 108 | VERIFYING_POOR_LINK, |
| 109 | /** Checking if network is a captive portal */ |
Wink Saville | 67c3821 | 2013-09-05 12:02:25 -0700 | [diff] [blame] | 110 | CAPTIVE_PORTAL_CHECK |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 111 | } |
| 112 | |
| 113 | /** |
| 114 | * This is the map described in the Javadoc comment above. The positions |
| 115 | * of the elements of the array must correspond to the ordinal values |
| 116 | * of <code>DetailedState</code>. |
| 117 | */ |
| 118 | private static final EnumMap<DetailedState, State> stateMap = |
| 119 | new EnumMap<DetailedState, State>(DetailedState.class); |
| 120 | |
| 121 | static { |
| 122 | stateMap.put(DetailedState.IDLE, State.DISCONNECTED); |
| 123 | stateMap.put(DetailedState.SCANNING, State.DISCONNECTED); |
| 124 | stateMap.put(DetailedState.CONNECTING, State.CONNECTING); |
| 125 | stateMap.put(DetailedState.AUTHENTICATING, State.CONNECTING); |
| 126 | stateMap.put(DetailedState.OBTAINING_IPADDR, State.CONNECTING); |
Irfan Sheriff | 07573b3 | 2012-01-27 21:00:19 -0800 | [diff] [blame] | 127 | stateMap.put(DetailedState.VERIFYING_POOR_LINK, State.CONNECTING); |
Irfan Sheriff | da6da09 | 2012-08-16 12:49:23 -0700 | [diff] [blame] | 128 | stateMap.put(DetailedState.CAPTIVE_PORTAL_CHECK, State.CONNECTING); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 129 | stateMap.put(DetailedState.CONNECTED, State.CONNECTED); |
| 130 | stateMap.put(DetailedState.SUSPENDED, State.SUSPENDED); |
| 131 | stateMap.put(DetailedState.DISCONNECTING, State.DISCONNECTING); |
| 132 | stateMap.put(DetailedState.DISCONNECTED, State.DISCONNECTED); |
| 133 | stateMap.put(DetailedState.FAILED, State.DISCONNECTED); |
Jeff Sharkey | c006f1a | 2011-05-19 17:12:49 -0700 | [diff] [blame] | 134 | stateMap.put(DetailedState.BLOCKED, State.DISCONNECTED); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 135 | } |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 136 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 137 | private int mNetworkType; |
| 138 | private int mSubtype; |
| 139 | private String mTypeName; |
| 140 | private String mSubtypeName; |
| 141 | private State mState; |
| 142 | private DetailedState mDetailedState; |
| 143 | private String mReason; |
| 144 | private String mExtraInfo; |
| 145 | private boolean mIsFailover; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 146 | private boolean mIsAvailable; |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 147 | private boolean mIsRoaming; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 148 | |
| 149 | /** |
Irfan Sheriff | d649c12 | 2010-06-09 15:39:36 -0700 | [diff] [blame] | 150 | * @hide |
| 151 | */ |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 152 | @UnsupportedAppUsage |
Irfan Sheriff | d649c12 | 2010-06-09 15:39:36 -0700 | [diff] [blame] | 153 | public NetworkInfo(int type, int subtype, String typeName, String subtypeName) { |
Hugo Benichi | 16f0a94 | 2017-06-20 14:07:59 +0900 | [diff] [blame] | 154 | if (!ConnectivityManager.isNetworkTypeValid(type) |
| 155 | && type != ConnectivityManager.TYPE_NONE) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 156 | throw new IllegalArgumentException("Invalid network type: " + type); |
| 157 | } |
| 158 | mNetworkType = type; |
| 159 | mSubtype = subtype; |
| 160 | mTypeName = typeName; |
| 161 | mSubtypeName = subtypeName; |
| 162 | setDetailedState(DetailedState.IDLE, null, null); |
| 163 | mState = State.UNKNOWN; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 164 | } |
| 165 | |
Jeff Sharkey | c006f1a | 2011-05-19 17:12:49 -0700 | [diff] [blame] | 166 | /** {@hide} */ |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 167 | @UnsupportedAppUsage |
Jeff Sharkey | c006f1a | 2011-05-19 17:12:49 -0700 | [diff] [blame] | 168 | public NetworkInfo(NetworkInfo source) { |
| 169 | if (source != null) { |
Narayan Kamath | 12b28ce | 2013-10-11 13:43:30 +0100 | [diff] [blame] | 170 | synchronized (source) { |
| 171 | mNetworkType = source.mNetworkType; |
| 172 | mSubtype = source.mSubtype; |
| 173 | mTypeName = source.mTypeName; |
| 174 | mSubtypeName = source.mSubtypeName; |
| 175 | mState = source.mState; |
| 176 | mDetailedState = source.mDetailedState; |
| 177 | mReason = source.mReason; |
| 178 | mExtraInfo = source.mExtraInfo; |
| 179 | mIsFailover = source.mIsFailover; |
Narayan Kamath | 12b28ce | 2013-10-11 13:43:30 +0100 | [diff] [blame] | 180 | mIsAvailable = source.mIsAvailable; |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 181 | mIsRoaming = source.mIsRoaming; |
Narayan Kamath | 12b28ce | 2013-10-11 13:43:30 +0100 | [diff] [blame] | 182 | } |
Jeff Sharkey | c006f1a | 2011-05-19 17:12:49 -0700 | [diff] [blame] | 183 | } |
| 184 | } |
| 185 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 186 | /** |
Scott Main | 671644c | 2011-10-06 19:02:28 -0700 | [diff] [blame] | 187 | * Reports the type of network to which the |
| 188 | * info in this {@code NetworkInfo} pertains. |
| 189 | * @return one of {@link ConnectivityManager#TYPE_MOBILE}, {@link |
| 190 | * ConnectivityManager#TYPE_WIFI}, {@link ConnectivityManager#TYPE_WIMAX}, {@link |
| 191 | * ConnectivityManager#TYPE_ETHERNET}, {@link ConnectivityManager#TYPE_BLUETOOTH}, or other |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 192 | * types defined by {@link ConnectivityManager}. |
| 193 | * @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport} |
| 194 | * instead with one of the NetworkCapabilities#TRANSPORT_* constants : |
| 195 | * {@link #getType} and {@link #getTypeName} cannot account for networks using |
| 196 | * multiple transports. Note that generally apps should not care about transport; |
| 197 | * {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and |
| 198 | * {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that |
| 199 | * apps concerned with meteredness or bandwidth should be looking at, as they |
| 200 | * offer this information with much better accuracy. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 201 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 202 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 203 | public int getType() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 204 | synchronized (this) { |
| 205 | return mNetworkType; |
| 206 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | /** |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 210 | * @deprecated Use {@link NetworkCapabilities} instead |
Robert Greenwalt | b90b20b | 2014-06-02 15:32:02 -0700 | [diff] [blame] | 211 | * @hide |
| 212 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 213 | @Deprecated |
Robert Greenwalt | b90b20b | 2014-06-02 15:32:02 -0700 | [diff] [blame] | 214 | public void setType(int type) { |
| 215 | synchronized (this) { |
| 216 | mNetworkType = type; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 221 | * Return a network-type-specific integer describing the subtype |
| 222 | * of the network. |
| 223 | * @return the network subtype |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 224 | * @deprecated Use {@link android.telephony.TelephonyManager#getDataNetworkType} instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 225 | */ |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 226 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 227 | public int getSubtype() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 228 | synchronized (this) { |
| 229 | return mSubtype; |
| 230 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 231 | } |
| 232 | |
Robert Greenwalt | 3192dec | 2014-05-27 13:20:24 -0700 | [diff] [blame] | 233 | /** |
| 234 | * @hide |
| 235 | */ |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 236 | @UnsupportedAppUsage |
Robert Greenwalt | 3192dec | 2014-05-27 13:20:24 -0700 | [diff] [blame] | 237 | public void setSubtype(int subtype, String subtypeName) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 238 | synchronized (this) { |
| 239 | mSubtype = subtype; |
| 240 | mSubtypeName = subtypeName; |
| 241 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Return a human-readable name describe the type of the network, |
| 246 | * for example "WIFI" or "MOBILE". |
| 247 | * @return the name of the network type |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 248 | * @deprecated Callers should switch to checking {@link NetworkCapabilities#hasTransport} |
| 249 | * instead with one of the NetworkCapabilities#TRANSPORT_* constants : |
| 250 | * {@link #getType} and {@link #getTypeName} cannot account for networks using |
| 251 | * multiple transports. Note that generally apps should not care about transport; |
| 252 | * {@link NetworkCapabilities#NET_CAPABILITY_NOT_METERED} and |
| 253 | * {@link NetworkCapabilities#getLinkDownstreamBandwidthKbps} are calls that |
| 254 | * apps concerned with meteredness or bandwidth should be looking at, as they |
| 255 | * offer this information with much better accuracy. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 256 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 257 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 258 | public String getTypeName() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 259 | synchronized (this) { |
| 260 | return mTypeName; |
| 261 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Return a human-readable name describing the subtype of the network. |
| 266 | * @return the name of the network subtype |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 267 | * @deprecated Use {@link android.telephony.TelephonyManager#getDataNetworkType} instead. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 268 | */ |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 269 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 270 | public String getSubtypeName() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 271 | synchronized (this) { |
| 272 | return mSubtypeName; |
| 273 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 274 | } |
| 275 | |
| 276 | /** |
| 277 | * Indicates whether network connectivity exists or is in the process |
| 278 | * of being established. This is good for applications that need to |
| 279 | * do anything related to the network other than read or write data. |
| 280 | * For the latter, call {@link #isConnected()} instead, which guarantees |
| 281 | * that the network is fully usable. |
| 282 | * @return {@code true} if network connectivity exists or is in the process |
| 283 | * of being established, {@code false} otherwise. |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 284 | * @deprecated Apps should instead use the |
| 285 | * {@link android.net.ConnectivityManager.NetworkCallback} API to |
| 286 | * learn about connectivity changes. |
| 287 | * {@link ConnectivityManager#registerDefaultNetworkCallback} and |
| 288 | * {@link ConnectivityManager#registerNetworkCallback}. These will |
| 289 | * give a more accurate picture of the connectivity state of |
| 290 | * the device and let apps react more easily and quickly to changes. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 291 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 292 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 293 | public boolean isConnectedOrConnecting() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 294 | synchronized (this) { |
| 295 | return mState == State.CONNECTED || mState == State.CONNECTING; |
| 296 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Indicates whether network connectivity exists and it is possible to establish |
| 301 | * connections and pass data. |
Scott Main | 671644c | 2011-10-06 19:02:28 -0700 | [diff] [blame] | 302 | * <p>Always call this before attempting to perform data transactions. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 303 | * @return {@code true} if network connectivity exists, {@code false} otherwise. |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 304 | * @deprecated Apps should instead use the |
| 305 | * {@link android.net.ConnectivityManager.NetworkCallback} API to |
| 306 | * learn about connectivity changes. See |
| 307 | * {@link ConnectivityManager#registerDefaultNetworkCallback} and |
| 308 | * {@link ConnectivityManager#registerNetworkCallback}. These will |
| 309 | * give a more accurate picture of the connectivity state of |
| 310 | * the device and let apps react more easily and quickly to changes. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 311 | */ |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 312 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 313 | public boolean isConnected() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 314 | synchronized (this) { |
| 315 | return mState == State.CONNECTED; |
| 316 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 317 | } |
| 318 | |
| 319 | /** |
| 320 | * Indicates whether network connectivity is possible. A network is unavailable |
| 321 | * when a persistent or semi-persistent condition prevents the possibility |
| 322 | * of connecting to that network. Examples include |
| 323 | * <ul> |
| 324 | * <li>The device is out of the coverage area for any network of this type.</li> |
| 325 | * <li>The device is on a network other than the home network (i.e., roaming), and |
| 326 | * data roaming has been disabled.</li> |
| 327 | * <li>The device's radio is turned off, e.g., because airplane mode is enabled.</li> |
| 328 | * </ul> |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 329 | * Since Android L, this always returns {@code true}, because the system only |
| 330 | * returns info for available networks. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 331 | * @return {@code true} if the network is available, {@code false} otherwise |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 332 | * @deprecated Apps should instead use the |
| 333 | * {@link android.net.ConnectivityManager.NetworkCallback} API to |
| 334 | * learn about connectivity changes. |
| 335 | * {@link ConnectivityManager#registerDefaultNetworkCallback} and |
| 336 | * {@link ConnectivityManager#registerNetworkCallback}. These will |
| 337 | * give a more accurate picture of the connectivity state of |
| 338 | * the device and let apps react more easily and quickly to changes. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 339 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 340 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 341 | public boolean isAvailable() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 342 | synchronized (this) { |
| 343 | return mIsAvailable; |
| 344 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | /** |
| 348 | * Sets if the network is available, ie, if the connectivity is possible. |
| 349 | * @param isAvailable the new availability value. |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 350 | * @deprecated Use {@link NetworkCapabilities} instead |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 351 | * |
| 352 | * @hide |
| 353 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 354 | @Deprecated |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 355 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 356 | public void setIsAvailable(boolean isAvailable) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 357 | synchronized (this) { |
| 358 | mIsAvailable = isAvailable; |
| 359 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 360 | } |
| 361 | |
| 362 | /** |
| 363 | * Indicates whether the current attempt to connect to the network |
| 364 | * resulted from the ConnectivityManager trying to fail over to this |
| 365 | * network following a disconnect from another network. |
| 366 | * @return {@code true} if this is a failover attempt, {@code false} |
| 367 | * otherwise. |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 368 | * @deprecated This field is not populated in recent Android releases, |
| 369 | * and does not make a lot of sense in a multi-network world. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 370 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 371 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 372 | public boolean isFailover() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 373 | synchronized (this) { |
| 374 | return mIsFailover; |
| 375 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 376 | } |
| 377 | |
| 378 | /** |
| 379 | * Set the failover boolean. |
| 380 | * @param isFailover {@code true} to mark the current connection attempt |
| 381 | * as a failover. |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 382 | * @deprecated This hasn't been set in any recent Android release. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 383 | * @hide |
| 384 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 385 | @Deprecated |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 386 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 387 | public void setFailover(boolean isFailover) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 388 | synchronized (this) { |
| 389 | mIsFailover = isFailover; |
| 390 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 391 | } |
| 392 | |
| 393 | /** |
Jeff Sharkey | 72f9c42 | 2017-10-27 17:22:59 -0600 | [diff] [blame] | 394 | * Indicates whether the device is currently roaming on this network. When |
| 395 | * {@code true}, it suggests that use of data on this network may incur |
| 396 | * extra costs. |
| 397 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 398 | * @return {@code true} if roaming is in effect, {@code false} otherwise. |
Jeff Sharkey | 72f9c42 | 2017-10-27 17:22:59 -0600 | [diff] [blame] | 399 | * @deprecated Callers should switch to checking |
| 400 | * {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} |
| 401 | * instead, since that handles more complex situations, such as |
| 402 | * VPNs. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 403 | */ |
Jeff Sharkey | 72f9c42 | 2017-10-27 17:22:59 -0600 | [diff] [blame] | 404 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 405 | public boolean isRoaming() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 406 | synchronized (this) { |
| 407 | return mIsRoaming; |
| 408 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 409 | } |
| 410 | |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 411 | /** |
| 412 | * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead. |
| 413 | * {@hide} |
| 414 | */ |
Jeff Sharkey | 836ecb5 | 2013-01-03 11:21:24 -0800 | [diff] [blame] | 415 | @VisibleForTesting |
Jeff Sharkey | 72f9c42 | 2017-10-27 17:22:59 -0600 | [diff] [blame] | 416 | @Deprecated |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 417 | @UnsupportedAppUsage |
Jeff Sharkey | 836ecb5 | 2013-01-03 11:21:24 -0800 | [diff] [blame] | 418 | public void setRoaming(boolean isRoaming) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 419 | synchronized (this) { |
| 420 | mIsRoaming = isRoaming; |
| 421 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | /** |
| 425 | * Reports the current coarse-grained state of the network. |
| 426 | * @return the coarse-grained state |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 427 | * @deprecated Apps should instead use the |
| 428 | * {@link android.net.ConnectivityManager.NetworkCallback} API to |
| 429 | * learn about connectivity changes. |
| 430 | * {@link ConnectivityManager#registerDefaultNetworkCallback} and |
| 431 | * {@link ConnectivityManager#registerNetworkCallback}. These will |
| 432 | * give a more accurate picture of the connectivity state of |
| 433 | * the device and let apps react more easily and quickly to changes. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 434 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 435 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 436 | public State getState() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 437 | synchronized (this) { |
| 438 | return mState; |
| 439 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | /** |
| 443 | * Reports the current fine-grained state of the network. |
| 444 | * @return the fine-grained state |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 445 | * @deprecated Apps should instead use the |
| 446 | * {@link android.net.ConnectivityManager.NetworkCallback} API to |
| 447 | * learn about connectivity changes. See |
| 448 | * {@link ConnectivityManager#registerDefaultNetworkCallback} and |
| 449 | * {@link ConnectivityManager#registerNetworkCallback}. These will |
| 450 | * give a more accurate picture of the connectivity state of |
| 451 | * the device and let apps react more easily and quickly to changes. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 452 | */ |
junyulai | 05986c6 | 2018-08-07 19:50:45 +0800 | [diff] [blame] | 453 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 454 | public DetailedState getDetailedState() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 455 | synchronized (this) { |
| 456 | return mDetailedState; |
| 457 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 458 | } |
| 459 | |
| 460 | /** |
| 461 | * Sets the fine-grained state of the network. |
| 462 | * @param detailedState the {@link DetailedState}. |
| 463 | * @param reason a {@code String} indicating the reason for the state change, |
| 464 | * if one was supplied. May be {@code null}. |
| 465 | * @param extraInfo an optional {@code String} providing addditional network state |
| 466 | * information passed up from the lower networking layers. |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 467 | * @deprecated Use {@link NetworkCapabilities} instead. |
Irfan Sheriff | d649c12 | 2010-06-09 15:39:36 -0700 | [diff] [blame] | 468 | * @hide |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 469 | */ |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 470 | @Deprecated |
Mathew Inwood | fa3a746 | 2018-08-08 14:52:47 +0100 | [diff] [blame] | 471 | @UnsupportedAppUsage |
Irfan Sheriff | d649c12 | 2010-06-09 15:39:36 -0700 | [diff] [blame] | 472 | public void setDetailedState(DetailedState detailedState, String reason, String extraInfo) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 473 | synchronized (this) { |
| 474 | this.mDetailedState = detailedState; |
| 475 | this.mState = stateMap.get(detailedState); |
| 476 | this.mReason = reason; |
| 477 | this.mExtraInfo = extraInfo; |
| 478 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 479 | } |
| 480 | |
| 481 | /** |
Doug Zongker | d60ae7f | 2011-11-03 12:45:42 -0700 | [diff] [blame] | 482 | * Set the extraInfo field. |
| 483 | * @param extraInfo an optional {@code String} providing addditional network state |
| 484 | * information passed up from the lower networking layers. |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 485 | * @deprecated See {@link NetworkInfo#getExtraInfo}. |
Doug Zongker | d60ae7f | 2011-11-03 12:45:42 -0700 | [diff] [blame] | 486 | * @hide |
| 487 | */ |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 488 | @Deprecated |
Doug Zongker | d60ae7f | 2011-11-03 12:45:42 -0700 | [diff] [blame] | 489 | public void setExtraInfo(String extraInfo) { |
| 490 | synchronized (this) { |
| 491 | this.mExtraInfo = extraInfo; |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 496 | * Report the reason an attempt to establish connectivity failed, |
| 497 | * if one is available. |
| 498 | * @return the reason for failure, or null if not available |
Chalard Jean | 8117f93 | 2018-03-08 13:54:53 +0900 | [diff] [blame] | 499 | * @deprecated This method does not have a consistent contract that could make it useful |
| 500 | * to callers. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 501 | */ |
| 502 | public String getReason() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 503 | synchronized (this) { |
| 504 | return mReason; |
| 505 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 506 | } |
| 507 | |
| 508 | /** |
| 509 | * Report the extra information about the network state, if any was |
Ang Li | 953b562 | 2014-09-15 14:44:01 -0700 | [diff] [blame] | 510 | * provided by the lower networking layers. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 511 | * @return the extra information, or null if not available |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 512 | * @deprecated Use other services e.g. WifiManager to get additional information passed up from |
| 513 | * the lower networking layers. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 514 | */ |
junyulai | 3822c8a | 2018-12-13 12:47:51 +0800 | [diff] [blame] | 515 | @Deprecated |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 516 | public String getExtraInfo() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 517 | synchronized (this) { |
| 518 | return mExtraInfo; |
| 519 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 520 | } |
| 521 | |
| 522 | @Override |
| 523 | public String toString() { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 524 | synchronized (this) { |
Robert Greenwalt | c9c90c7 | 2014-05-13 15:36:27 -0700 | [diff] [blame] | 525 | StringBuilder builder = new StringBuilder("["); |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 526 | builder.append("type: ").append(getTypeName()).append("[").append(getSubtypeName()). |
| 527 | append("], state: ").append(mState).append("/").append(mDetailedState). |
| 528 | append(", reason: ").append(mReason == null ? "(unspecified)" : mReason). |
| 529 | append(", extra: ").append(mExtraInfo == null ? "(none)" : mExtraInfo). |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 530 | append(", failover: ").append(mIsFailover). |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 531 | append(", available: ").append(mIsAvailable). |
| 532 | append(", roaming: ").append(mIsRoaming). |
Robert Greenwalt | c9c90c7 | 2014-05-13 15:36:27 -0700 | [diff] [blame] | 533 | append("]"); |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 534 | return builder.toString(); |
| 535 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 536 | } |
| 537 | |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 538 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 539 | public int describeContents() { |
| 540 | return 0; |
| 541 | } |
| 542 | |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 543 | @Override |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 544 | public void writeToParcel(Parcel dest, int flags) { |
Irfan Sheriff | a2a1b91 | 2010-06-07 09:03:04 -0700 | [diff] [blame] | 545 | synchronized (this) { |
| 546 | dest.writeInt(mNetworkType); |
| 547 | dest.writeInt(mSubtype); |
| 548 | dest.writeString(mTypeName); |
| 549 | dest.writeString(mSubtypeName); |
| 550 | dest.writeString(mState.name()); |
| 551 | dest.writeString(mDetailedState.name()); |
| 552 | dest.writeInt(mIsFailover ? 1 : 0); |
| 553 | dest.writeInt(mIsAvailable ? 1 : 0); |
| 554 | dest.writeInt(mIsRoaming ? 1 : 0); |
| 555 | dest.writeString(mReason); |
| 556 | dest.writeString(mExtraInfo); |
| 557 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 558 | } |
| 559 | |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 560 | public static final Creator<NetworkInfo> CREATOR = new Creator<NetworkInfo>() { |
| 561 | @Override |
| 562 | public NetworkInfo createFromParcel(Parcel in) { |
| 563 | int netType = in.readInt(); |
| 564 | int subtype = in.readInt(); |
| 565 | String typeName = in.readString(); |
| 566 | String subtypeName = in.readString(); |
| 567 | NetworkInfo netInfo = new NetworkInfo(netType, subtype, typeName, subtypeName); |
| 568 | netInfo.mState = State.valueOf(in.readString()); |
| 569 | netInfo.mDetailedState = DetailedState.valueOf(in.readString()); |
| 570 | netInfo.mIsFailover = in.readInt() != 0; |
| 571 | netInfo.mIsAvailable = in.readInt() != 0; |
| 572 | netInfo.mIsRoaming = in.readInt() != 0; |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 573 | netInfo.mReason = in.readString(); |
| 574 | netInfo.mExtraInfo = in.readString(); |
| 575 | return netInfo; |
| 576 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 577 | |
Jeff Sharkey | f07c7b9 | 2016-04-22 09:50:16 -0600 | [diff] [blame] | 578 | @Override |
| 579 | public NetworkInfo[] newArray(int size) { |
| 580 | return new NetworkInfo[size]; |
| 581 | } |
| 582 | }; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 583 | } |