From e55ada78920c8707463ae3227327cfe2dd9c4ad1 Mon Sep 17 00:00:00 2001 From: Andrew Stadler Date: Tue, 31 Aug 2010 14:28:58 -0700 Subject: [PATCH] Fix crash when proxy exclusion list is null. Also cleaned up source a little bit and eliminated a warning. Bug: 2964821 Change-Id: I35825bb345742ea1a1854e8998aa67e353deaa17 --- core/java/android/net/ProxyProperties.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/java/android/net/ProxyProperties.java b/core/java/android/net/ProxyProperties.java index ba27221ed1..17d0ec050f 100644 --- a/core/java/android/net/ProxyProperties.java +++ b/core/java/android/net/ProxyProperties.java @@ -41,13 +41,17 @@ public class ProxyProperties implements Parcelable { if (source != null) { mProxy = source.getAddress(); mPort = source.getPort(); - mExclusionList = new String(source.getExclusionList()); + String exclusionList = source.getExclusionList(); + if (exclusionList != null) { + mExclusionList = new String(exclusionList); + } } } public InetAddress getAddress() { return mProxy; } + public void setAddress(InetAddress proxy) { mProxy = proxy; } @@ -55,6 +59,7 @@ public class ProxyProperties implements Parcelable { public int getPort() { return mPort; } + public void setPort(int port) { mPort = port; } @@ -62,6 +67,7 @@ public class ProxyProperties implements Parcelable { public String getExclusionList() { return mExclusionList; } + public void setExclusionList(String exclusionList) { mExclusionList = exclusionList; } @@ -121,5 +127,4 @@ public class ProxyProperties implements Parcelable { return new ProxyProperties[size]; } }; - -}; +}