uploadop: clean up, add logging

This commit is contained in:
Vincent Breitmoser
2015-10-29 14:50:29 +01:00
parent e89dba8f24
commit a1330f78e4
13 changed files with 138 additions and 77 deletions

View File

@@ -19,6 +19,7 @@ package org.sufficientlysecure.keychain.util;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import java.net.InetSocketAddress;
import java.net.Proxy;
@@ -47,6 +48,7 @@ public class ParcelableProxy implements Parcelable {
return new ParcelableProxy(null, -1, null);
}
@Nullable
public Proxy getProxy() {
if (mProxyHost == null) {
return null;

View File

@@ -23,6 +23,8 @@ import android.content.SharedPreferences;
import android.content.res.Resources;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.Constants.Pref;
import org.sufficientlysecure.keychain.service.KeyserverSyncAdapterService;
@@ -322,6 +324,11 @@ public class Preferences {
if (!torEnabled && !normalPorxyEnabled) this.parcelableProxy = new ParcelableProxy(null, -1, null);
else this.parcelableProxy = new ParcelableProxy(hostName, port, type);
}
public Proxy getProxy() {
return parcelableProxy.getProxy();
}
}
// cloud prefs