|
@ -20,6 +20,7 @@ import androidx.appcompat.app.AppCompatActivity; |
|
|
|
|
|
|
|
|
import java.security.MessageDigest; |
|
|
import java.security.MessageDigest; |
|
|
import java.security.NoSuchAlgorithmException; |
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
|
|
import java.util.Locale; |
|
|
|
|
|
|
|
|
import javax.security.cert.CertificateException; |
|
|
import javax.security.cert.CertificateException; |
|
|
import javax.security.cert.X509Certificate; |
|
|
import javax.security.cert.X509Certificate; |
|
@ -102,10 +103,8 @@ public final class FlavorTown { |
|
|
|
|
|
|
|
|
public static void changelogCheck(@NonNull final Context context) { |
|
|
public static void changelogCheck(@NonNull final Context context) { |
|
|
if (settingsHelper.getInteger(Constants.PREV_INSTALL_VERSION) < BuildConfig.VERSION_CODE) { |
|
|
if (settingsHelper.getInteger(Constants.PREV_INSTALL_VERSION) < BuildConfig.VERSION_CODE) { |
|
|
final String langCode = settingsHelper.getString(Constants.APP_LANGUAGE); |
|
|
|
|
|
final String lang = LocaleUtils.getCorrespondingLanguageCode(langCode); |
|
|
|
|
|
final int appUaCode = settingsHelper.getInteger(Constants.APP_UA_CODE); |
|
|
final int appUaCode = settingsHelper.getInteger(Constants.APP_UA_CODE); |
|
|
final String appUa = UserAgentUtils.generateAppUA(appUaCode, lang); |
|
|
|
|
|
|
|
|
final String appUa = UserAgentUtils.generateAppUA(appUaCode, LocaleUtils.getCurrentLocale().getLanguage()); |
|
|
settingsHelper.putString(Constants.APP_UA, appUa); |
|
|
settingsHelper.putString(Constants.APP_UA, appUa); |
|
|
final int browserUaCode = settingsHelper.getInteger(Constants.BROWSER_UA_CODE); |
|
|
final int browserUaCode = settingsHelper.getInteger(Constants.BROWSER_UA_CODE); |
|
|
final String browserUa = UserAgentUtils.generateBrowserUA(browserUaCode); |
|
|
final String browserUa = UserAgentUtils.generateBrowserUA(browserUaCode); |
|
|