diff options
Diffstat (limited to 'OpenKeychain')
2 files changed, 8 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java index bd85b7a0a..8048f1fea 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyserver.java @@ -209,8 +209,13 @@ public class HkpKeyserver extends Keyserver { Log.w(Constants.TAG, e); } - client.setProxy(proxy); - client.setConnectTimeout(proxy != null ? 30000 : 5000, TimeUnit.MILLISECONDS); + if (proxy != null) { + client.setProxy(proxy); + client.setConnectTimeout(30000, TimeUnit.MILLISECONDS); + } else { + client.setProxy(Proxy.NO_PROXY); + client.setConnectTimeout(5000, TimeUnit.MILLISECONDS); + } client.setReadTimeout(45000, TimeUnit.MILLISECONDS); return client; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListCloudLoader.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListCloudLoader.java index c7f69207c..9d3d230d4 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListCloudLoader.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListCloudLoader.java @@ -103,7 +103,7 @@ public class ImportKeysListCloudLoader ArrayList<ImportKeysListEntry> searchResult = CloudSearch.search( mServerQuery, mCloudPrefs, - mParcelableProxy.getProxy() + mParcelableProxy != null ? mParcelableProxy.getProxy() : null ); mEntryList.clear(); |