diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-01-12 17:10:58 -0800 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-01-12 17:10:58 -0800 |
commit | bf57471e0220ca6db8cb81471dc2b3ddb2863f5b (patch) | |
tree | 81aa0826ce0ce22eed738e11fba2be33ac9413fe /src/com/android | |
parent | fac822d39e1e608618e0dfbda037edeadac154bb (diff) | |
download | packages_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')
-rw-r--r-- | src/com/android/browser/NetworkStateHandler.java | 5 |
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); } } }; |