summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/ProxyProperties.java
diff options
context:
space:
mode:
authorRobert Greenwalt <robdroid@android.com>2010-08-30 10:56:47 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2010-08-30 15:54:37 -0700
commit37e65ebb7eb932e1a144b1cab262e11ca5fd109b (patch)
tree8778822097d0ab67bc0a4c222cd7e01d2ade9082 /core/java/android/net/ProxyProperties.java
parente82235ae7049badf6758ffef3c13080b135986f4 (diff)
downloadframeworks_base-37e65ebb7eb932e1a144b1cab262e11ca5fd109b.zip
frameworks_base-37e65ebb7eb932e1a144b1cab262e11ca5fd109b.tar.gz
frameworks_base-37e65ebb7eb932e1a144b1cab262e11ca5fd109b.tar.bz2
Rename NetworkProperties to LinkProperties
Also add copy constructors and use them when giving out data. Change-Id: Id320eb8fb91d0bd250305ce7bb4f628570215615
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());