diff options
author | cyBerta <cyberta@riseup.net> | 2023-08-02 22:45:26 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-08-02 22:45:26 +0200 |
commit | 64449816223cb9abb6e75310c03dcc9353a42ee4 (patch) | |
tree | 66cb86d382cc67267441a10320f7e13cd125e66b /app/src/production | |
parent | 1ac4ec903f0d10b65810b720f76f08df969c3bec (diff) |
use single instance of shared prefernces across the app, this reduces the laggyness of the UI noticably
Diffstat (limited to 'app/src/production')
-rw-r--r-- | app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
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 63823925..59b9159c 100644 --- a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java +++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java @@ -37,7 +37,6 @@ import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWN import static se.leap.bitmaskclient.tor.TorStatusObservable.TorStatus.OFF; import static se.leap.bitmaskclient.tor.TorStatusObservable.getProxyPort; -import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Bundle; import android.util.Pair; @@ -54,6 +53,7 @@ import okhttp3.OkHttpClient; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.models.Provider; import se.leap.bitmaskclient.base.utils.ConfigHelper; +import se.leap.bitmaskclient.base.utils.PreferenceHelper; import se.leap.bitmaskclient.eip.EIP; import se.leap.bitmaskclient.providersetup.connectivity.OkHttpClientGenerator; import se.leap.bitmaskclient.tor.TorStatusObservable; @@ -68,8 +68,8 @@ public class ProviderApiManager extends ProviderApiManagerBase { private static final String TAG = ProviderApiManager.class.getSimpleName(); - public ProviderApiManager(SharedPreferences preferences, Resources resources, OkHttpClientGenerator clientGenerator, ProviderApiServiceCallback callback) { - super(preferences, resources, clientGenerator, callback); + public ProviderApiManager(Resources resources, OkHttpClientGenerator clientGenerator, ProviderApiServiceCallback callback) { + super(resources, clientGenerator, callback); } /** @@ -271,7 +271,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { if (DEBUG_MODE) { VpnStatus.logDebug("[API] CA CERT: " + certString); } - preferences.edit().putString(Provider.CA_CERT + "." + providerDomain, certString).apply(); + PreferenceHelper.putProviderString(providerDomain, Provider.CA_CERT, certString); result.putBoolean(BROADCAST_RESULT_KEY, true); } else { setErrorResult(result, warning_corrupted_provider_cert, ERROR_CERTIFICATE_PINNING.toString()); |