Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
57a8588243 | ||
|
c065405acf | ||
|
057eacfb3b |
5 changed files with 13 additions and 27 deletions
|
@ -22,8 +22,8 @@ plugins {
|
||||||
apply(from = "static-ips.gradle.kts")
|
apply(from = "static-ips.gradle.kts")
|
||||||
|
|
||||||
val canonicalVersionCode = 1443
|
val canonicalVersionCode = 1443
|
||||||
val canonicalVersionName = "7.13.3"
|
val canonicalVersionName = "7.13.4"
|
||||||
val currentHotfixVersion = 0
|
val currentHotfixVersion = 1
|
||||||
val maxHotfixVersions = 100
|
val maxHotfixVersions = 100
|
||||||
|
|
||||||
val keystores: Map<String, Properties?> = mapOf("debug" to loadKeystoreProperties("keystore.debug.properties"))
|
val keystores: Map<String, Properties?> = mapOf("debug" to loadKeystoreProperties("keystore.debug.properties"))
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.thoughtcrime.securesms.net.StaticDns
|
||||||
import org.whispersystems.signalservice.api.push.TrustStore
|
import org.whispersystems.signalservice.api.push.TrustStore
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalCdnUrl
|
import org.whispersystems.signalservice.internal.configuration.SignalCdnUrl
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalCdsiUrl
|
import org.whispersystems.signalservice.internal.configuration.SignalCdsiUrl
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalKeyBackupServiceUrl
|
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration
|
import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalServiceUrl
|
import org.whispersystems.signalservice.internal.configuration.SignalServiceUrl
|
||||||
import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl
|
import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl
|
||||||
|
@ -68,6 +67,8 @@ open class SignalServiceNetworkAccess(context: Context) {
|
||||||
private const val COUNTRY_CODE_IRAN = 98
|
private const val COUNTRY_CODE_IRAN = 98
|
||||||
private const val COUNTRY_CODE_CUBA = 53
|
private const val COUNTRY_CODE_CUBA = 53
|
||||||
private const val COUNTRY_CODE_UZBEKISTAN = 998
|
private const val COUNTRY_CODE_UZBEKISTAN = 998
|
||||||
|
private const val COUNTRY_CODE_RUSSIA = 7
|
||||||
|
private const val COUNTRY_CODE_VENEZUELA = 58
|
||||||
|
|
||||||
private const val G_HOST = "reflector-nrgwuv7kwq-uc.a.run.app"
|
private const val G_HOST = "reflector-nrgwuv7kwq-uc.a.run.app"
|
||||||
private const val F_SERVICE_HOST = "chat-signal.global.ssl.fastly.net"
|
private const val F_SERVICE_HOST = "chat-signal.global.ssl.fastly.net"
|
||||||
|
@ -77,7 +78,6 @@ open class SignalServiceNetworkAccess(context: Context) {
|
||||||
private const val F_CDN3_HOST = "cdn3-signal.global.ssl.fastly.net"
|
private const val F_CDN3_HOST = "cdn3-signal.global.ssl.fastly.net"
|
||||||
private const val F_CDSI_HOST = "cdsi-signal.global.ssl.fastly.net"
|
private const val F_CDSI_HOST = "cdsi-signal.global.ssl.fastly.net"
|
||||||
private const val F_SVR2_HOST = "svr2-signal.global.ssl.fastly.net"
|
private const val F_SVR2_HOST = "svr2-signal.global.ssl.fastly.net"
|
||||||
private const val F_KBS_HOST = "api.backup.signal.org.global.prod.fastly.net"
|
|
||||||
|
|
||||||
private val GMAPS_CONNECTION_SPEC = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
private val GMAPS_CONNECTION_SPEC = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
||||||
.tlsVersions(TlsVersion.TLS_1_2)
|
.tlsVersions(TlsVersion.TLS_1_2)
|
||||||
|
@ -208,8 +208,12 @@ open class SignalServiceNetworkAccess(context: Context) {
|
||||||
COUNTRY_CODE_UZBEKISTAN to buildGConfiguration(
|
COUNTRY_CODE_UZBEKISTAN to buildGConfiguration(
|
||||||
listOf(HostConfig("https://www.google.co.uz", G_HOST, GMAIL_CONNECTION_SPEC)) + baseGHostConfigs
|
listOf(HostConfig("https://www.google.co.uz", G_HOST, GMAIL_CONNECTION_SPEC)) + baseGHostConfigs
|
||||||
),
|
),
|
||||||
|
COUNTRY_CODE_VENEZUELA to buildGConfiguration(
|
||||||
|
listOf(HostConfig("https://www.google.co.ve", G_HOST, GMAIL_CONNECTION_SPEC)) + baseGHostConfigs
|
||||||
|
),
|
||||||
COUNTRY_CODE_IRAN to fConfig,
|
COUNTRY_CODE_IRAN to fConfig,
|
||||||
COUNTRY_CODE_CUBA to fConfig
|
COUNTRY_CODE_CUBA to fConfig,
|
||||||
|
COUNTRY_CODE_RUSSIA to fConfig
|
||||||
)
|
)
|
||||||
|
|
||||||
private val defaultCensoredConfiguration: SignalServiceConfiguration = buildGConfiguration(baseGHostConfigs)
|
private val defaultCensoredConfiguration: SignalServiceConfiguration = buildGConfiguration(baseGHostConfigs)
|
||||||
|
@ -289,7 +293,6 @@ open class SignalServiceNetworkAccess(context: Context) {
|
||||||
val cdnUrls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
val cdnUrls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
||||||
val cdn2Urls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn2", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
val cdn2Urls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn2", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
||||||
val cdn3Urls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn3", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
val cdn3Urls: Array<SignalCdnUrl> = hostConfigs.map { SignalCdnUrl("${it.baseUrl}/cdn3", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
||||||
val kbsUrls: Array<SignalKeyBackupServiceUrl> = hostConfigs.map { SignalKeyBackupServiceUrl("${it.baseUrl}/backup", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
|
||||||
val storageUrls: Array<SignalStorageUrl> = hostConfigs.map { SignalStorageUrl("${it.baseUrl}/storage", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
val storageUrls: Array<SignalStorageUrl> = hostConfigs.map { SignalStorageUrl("${it.baseUrl}/storage", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
||||||
val cdsiUrls: Array<SignalCdsiUrl> = hostConfigs.map { SignalCdsiUrl("${it.baseUrl}/cdsi", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
val cdsiUrls: Array<SignalCdsiUrl> = hostConfigs.map { SignalCdsiUrl("${it.baseUrl}/cdsi", it.host, gTrustStore, it.connectionSpec) }.toTypedArray()
|
||||||
val svr2Urls: Array<SignalSvr2Url> = hostConfigs.map { SignalSvr2Url("${it.baseUrl}/svr2", gTrustStore, it.host, it.connectionSpec) }.toTypedArray()
|
val svr2Urls: Array<SignalSvr2Url> = hostConfigs.map { SignalSvr2Url("${it.baseUrl}/svr2", gTrustStore, it.host, it.connectionSpec) }.toTypedArray()
|
||||||
|
|
|
@ -153,7 +153,7 @@ class EnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_registration_
|
||||||
phoneNumberInputLayout.requestFocus()
|
phoneNumberInputLayout.requestFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fragmentViewModel.isEnteredNumberValid(fragmentState)) {
|
if (fragmentViewModel.isEnteredNumberPossible(fragmentState)) {
|
||||||
sharedViewModel.setPhoneNumber(fragmentViewModel.parsePhoneNumber(fragmentState))
|
sharedViewModel.setPhoneNumber(fragmentViewModel.parsePhoneNumber(fragmentState))
|
||||||
} else {
|
} else {
|
||||||
sharedViewModel.setPhoneNumber(null)
|
sharedViewModel.setPhoneNumber(null)
|
||||||
|
@ -258,7 +258,7 @@ class EnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_registration_
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun presentRegisterButton(sharedState: RegistrationState) {
|
private fun presentRegisterButton(sharedState: RegistrationState) {
|
||||||
binding.registerButton.isEnabled = sharedState.phoneNumber != null && PhoneNumberUtil.getInstance().isValidNumber(sharedState.phoneNumber)
|
binding.registerButton.isEnabled = sharedState.phoneNumber != null && PhoneNumberUtil.getInstance().isPossibleNumber(sharedState.phoneNumber)
|
||||||
if (sharedState.inProgress) {
|
if (sharedState.inProgress) {
|
||||||
binding.registerButton.setSpinning()
|
binding.registerButton.setSpinning()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -89,9 +89,9 @@ class EnterPhoneNumberViewModel : ViewModel() {
|
||||||
return PhoneNumberUtil.getInstance().parse(state.phoneNumber, supportedCountryPrefixes[state.countryPrefixIndex].regionCode)
|
return PhoneNumberUtil.getInstance().parse(state.phoneNumber, supportedCountryPrefixes[state.countryPrefixIndex].regionCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isEnteredNumberValid(state: EnterPhoneNumberState): Boolean {
|
fun isEnteredNumberPossible(state: EnterPhoneNumberState): Boolean {
|
||||||
return try {
|
return try {
|
||||||
PhoneNumberUtil.getInstance().isValidNumber(parsePhoneNumber(state))
|
PhoneNumberUtil.getInstance().isPossibleNumber(parsePhoneNumber(state))
|
||||||
} catch (ex: NumberParseException) {
|
} catch (ex: NumberParseException) {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package org.whispersystems.signalservice.internal.configuration;
|
|
||||||
|
|
||||||
|
|
||||||
import org.whispersystems.signalservice.api.push.TrustStore;
|
|
||||||
|
|
||||||
import okhttp3.ConnectionSpec;
|
|
||||||
|
|
||||||
public class SignalKeyBackupServiceUrl extends SignalUrl {
|
|
||||||
|
|
||||||
public SignalKeyBackupServiceUrl(String url, TrustStore trustStore) {
|
|
||||||
super(url, trustStore);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SignalKeyBackupServiceUrl(String url, String hostHeader, TrustStore trustStore, ConnectionSpec connectionSpec) {
|
|
||||||
super(url, hostHeader, trustStore, connectionSpec);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue