diff options
Diffstat (limited to 'core/java/android/net/NetworkStateTracker.java')
-rw-r--r-- | core/java/android/net/NetworkStateTracker.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/net/NetworkStateTracker.java b/core/java/android/net/NetworkStateTracker.java index c161f3a..9140dc9 100644 --- a/core/java/android/net/NetworkStateTracker.java +++ b/core/java/android/net/NetworkStateTracker.java @@ -315,7 +315,7 @@ public abstract class NetworkStateTracker extends Handler { public boolean isTeardownRequested() { return mTeardownRequested; } - + /** * Send a notification that the results of a scan for network access * points has completed, and results are available. @@ -340,10 +340,10 @@ public abstract class NetworkStateTracker extends Handler { } protected void setSubtype(int subtype, String subtypeName) { - if (mNetworkInfo.isConnected()) { - int oldSubtype = mNetworkInfo.getSubtype(); - if (subtype != oldSubtype) { - mNetworkInfo.setSubtype(subtype, subtypeName); + int oldSubtype = mNetworkInfo.getSubtype(); + if (subtype != oldSubtype) { + mNetworkInfo.setSubtype(subtype, subtypeName); + if (mNetworkInfo.isConnected()) { Message msg = mTarget.obtainMessage( EVENT_NETWORK_SUBTYPE_CHANGED, oldSubtype, 0, mNetworkInfo); msg.sendToTarget(); |