diff options
author | cyBerta <cyberta@riseup.net> | 2021-11-04 16:45:54 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-11-04 16:45:54 +0100 |
commit | d27af3b17d6636de8b2755090b6fe6329531f639 (patch) | |
tree | 67877ba5a3482b96d424e324bb083475b24a1472 /app | |
parent | d5584eff59052d08ddcafd84c7b733720c038512 (diff) |
remove unused UNKNOWN TorStatus state
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java | 5 | ||||
-rw-r--r-- | app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java index fb7e4d93..f4f0ff11 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java @@ -22,7 +22,7 @@ public class TorStatusObservable extends Observable { OFF, STARTING, STOPPING, - UNKOWN + // UNKOWN } private boolean cancelled = false; @@ -31,7 +31,7 @@ public class TorStatusObservable extends Observable { public static final String LOG_TAG_SNOWFLAKE = "[SNOWFLAKE]"; private static TorStatusObservable instance; - private TorStatus status = TorStatus.UNKOWN; + private TorStatus status = TorStatus.OFF; private final TorNotificationManager torNotificationManager; private String lastError; private String lastTorLog; @@ -196,7 +196,6 @@ public class TorStatusObservable extends Observable { case STOPPING: return context.getString(R.string.tor_stopping); case OFF: - case UNKOWN: break; } return null; diff --git a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java index 6ca3e949..c60e21dc 100644 --- a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java +++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java @@ -57,7 +57,6 @@ import static se.leap.bitmaskclient.providersetup.ProviderAPI.ERRORS; import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CERTIFICATE_PINNING; import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CORRUPTED_PROVIDER_JSON; import static se.leap.bitmaskclient.tor.TorStatusObservable.TorStatus.OFF; -import static se.leap.bitmaskclient.tor.TorStatusObservable.TorStatus.UNKOWN; import static se.leap.bitmaskclient.tor.TorStatusObservable.getProxyPort; /** @@ -332,8 +331,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { responseString.contains(ERRORS) && PreferenceHelper.getUseBridges(preferences) && EipStatus.getInstance().isDisconnected() && - (TorStatusObservable.getStatus() == OFF || - TorStatusObservable.getStatus() == UNKOWN) && + TorStatusObservable.getStatus() == OFF && startTorProxy() ) { return downloadWithCommercialCA(stringUrl, provider, 1); @@ -377,8 +375,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { responseString.contains(ERRORS) && PreferenceHelper.getUseBridges(preferences) && EipStatus.getInstance().isDisconnected() && - (TorStatusObservable.getStatus() == OFF || - TorStatusObservable.getStatus() == UNKOWN) && + TorStatusObservable.getStatus() == OFF && startTorProxy() ) { return downloadFromUrlWithProviderCA(urlString, provider, 1); |