summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/NetworkStateHandler.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-01-12 17:10:58 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2011-01-12 17:10:58 -0800
commitbf57471e0220ca6db8cb81471dc2b3ddb2863f5b (patch)
tree81aa0826ce0ce22eed738e11fba2be33ac9413fe /src/com/android/browser/NetworkStateHandler.java
parentfac822d39e1e608618e0dfbda037edeadac154bb (diff)
downloadpackages_apps_Browser-bf57471e0220ca6db8cb81471dc2b3ddb2863f5b.zip
packages_apps_Browser-bf57471e0220ca6db8cb81471dc2b3ddb2863f5b.tar.gz
packages_apps_Browser-bf57471e0220ca6db8cb81471dc2b3ddb2863f5b.tar.bz2
Fix connection-determination code.
Don't use isAvailable as a measure of connectedness. EXTRA_NO_CONNECTION is better - if it has a problem file a bug about that rather than finding other mechanisms. Change-Id: Ia8836972a1f268afef34cca06547af011dc11e6b
Diffstat (limited to 'src/com/android/browser/NetworkStateHandler.java')
-rw-r--r--src/com/android/browser/NetworkStateHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/NetworkStateHandler.java b/src/com/android/browser/NetworkStateHandler.java
index 3b2007e..37f4a2f 100644
--- a/src/com/android/browser/NetworkStateHandler.java
+++ b/src/com/android/browser/NetworkStateHandler.java
@@ -72,7 +72,10 @@ public class NetworkStateHandler {
sendNetworkType(typeName.toLowerCase(),
(subtypeName != null ? subtypeName.toLowerCase() : ""));
- onNetworkToggle(info.isAvailable());
+ boolean noConnection = intent.getBooleanExtra(
+ ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
+
+ onNetworkToggle(!noConnection);
}
}
};