Fix NPE when going from proxy to no proxy.

bug:5081431
Change-Id: I68a8cca94e4612bd9ee2faf1123e0b63dc25b833
This commit is contained in:
Robert Greenwalt
2011-07-29 10:03:37 -07:00
parent 9520d6af5a
commit 027f505669

View File

@@ -2299,7 +2299,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
synchronized (this) { synchronized (this) {
if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return; if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return;
if (mDefaultProxy == proxy) return; if (mDefaultProxy == proxy) return;
if (!TextUtils.isEmpty(proxy.getHost())) { if (proxy != null && !TextUtils.isEmpty(proxy.getHost())) {
mDefaultProxy = proxy; mDefaultProxy = proxy;
} else { } else {
mDefaultProxy = null; mDefaultProxy = null;