diff options
author | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-06-08 01:56:35 +0530 |
---|---|---|
committer | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-07-03 20:46:15 +0530 |
commit | dbc3f90360e56538ca9f599241edce9ac81e063c (patch) | |
tree | 6eee5726cce6e406dce0a979e34852ecad72c283 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java | |
parent | 413536c62b39f9c583cf86b4cd9750b088df6563 (diff) | |
download | open-keychain-dbc3f90360e56538ca9f599241edce9ac81e063c.tar.gz open-keychain-dbc3f90360e56538ca9f599241edce9ac81e063c.tar.bz2 open-keychain-dbc3f90360e56538ca9f599241edce9ac81e063c.zip |
fixed Proxy generation, proxy working for for cloud import
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java index a24141a69..e5bb1deb4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ParcelableProxy.java @@ -34,13 +34,11 @@ public class ParcelableProxy implements Parcelable { private final int TYPE_HTTP = 1; private final int TYPE_SOCKS = 2; - public ParcelableProxy(Proxy proxy) { - InetSocketAddress address = (InetSocketAddress) proxy.address(); + public ParcelableProxy(String hostName, int port, Proxy.Type type) { + mProxyHost = hostName; + mProxyPort = port; - mProxyHost = address.getHostName(); - mProxyPort = address.getPort(); - - switch (proxy.type()) { + switch (type) { case HTTP: { mProxyType = TYPE_HTTP; break; |