summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/ProxyProperties.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/net/ProxyProperties.java')
-rw-r--r--core/java/android/net/ProxyProperties.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/core/java/android/net/ProxyProperties.java b/core/java/android/net/ProxyProperties.java
index 207fb51..24f6766 100644
--- a/core/java/android/net/ProxyProperties.java
+++ b/core/java/android/net/ProxyProperties.java
@@ -36,24 +36,31 @@ public class ProxyProperties implements Parcelable {
public ProxyProperties() {
}
- public synchronized InetAddress getAddress() {
+ // copy constructor instead of clone
+ public ProxyProperties(ProxyProperties source) {
+ mProxy = source.getAddress();
+ mPort = source.getPort();
+ mExclusionList = new String(source.getExclusionList());
+ }
+
+ public InetAddress getAddress() {
return mProxy;
}
- public synchronized void setAddress(InetAddress proxy) {
+ public void setAddress(InetAddress proxy) {
mProxy = proxy;
}
- public synchronized int getPort() {
+ public int getPort() {
return mPort;
}
- public synchronized void setPort(int port) {
+ public void setPort(int port) {
mPort = port;
}
- public synchronized String getExclusionList() {
+ public String getExclusionList() {
return mExclusionList;
}
- public synchronized void setExclusionList(String exclusionList) {
+ public void setExclusionList(String exclusionList) {
mExclusionList = exclusionList;
}
@@ -77,7 +84,7 @@ public class ProxyProperties implements Parcelable {
* Implement the Parcelable interface.
* @hide
*/
- public synchronized void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(Parcel dest, int flags) {
if (mProxy != null) {
dest.writeByte((byte)1);
dest.writeString(mProxy.getHostName());