Skip to content

Commit

Permalink
Merge tag 'v7.13.4' into molly-7.13
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Aug 16, 2024
2 parents 35a26d9 + 57a8588 commit c3bf563
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 28 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ apply {
}

val canonicalVersionCode = 1443
val canonicalVersionName = "7.13.3"
val currentHotfixVersion = 0
val canonicalVersionName = "7.13.4"
val currentHotfixVersion = 1
val maxHotfixVersions = 100
val mollyRevision = 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import org.thoughtcrime.securesms.net.StandardUserAgentInterceptor
import org.whispersystems.signalservice.api.push.TrustStore
import org.whispersystems.signalservice.internal.configuration.SignalCdnUrl
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.SignalServiceUrl
import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl
Expand Down Expand Up @@ -47,6 +46,8 @@ open class SignalServiceNetworkAccess(context: Context) {
private const val COUNTRY_CODE_IRAN = 98
private const val COUNTRY_CODE_CUBA = 53
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 F_SERVICE_HOST = "chat-signal.global.ssl.fastly.net"
Expand All @@ -56,7 +57,6 @@ open class SignalServiceNetworkAccess(context: Context) {
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_SVR2_HOST = "svr2-signal.global.ssl.fastly.net"
private const val F_KBS_HOST = "api.backup.signal.org.global.prod.fastly.net"

private const val HTTPS_WWW_GOOGLE_COM = "https://www.google.com"
private const val HTTPS_ANDROID_CLIENTS_GOOGLE_COM = "https://android.clients.google.com"
Expand Down Expand Up @@ -94,7 +94,6 @@ open class SignalServiceNetworkAccess(context: Context) {
F_CDN3_HOST,
F_CDSI_HOST,
F_SVR2_HOST,
F_KBS_HOST,
HTTPS_WWW_GOOGLE_COM.stripProtocol(),
HTTPS_ANDROID_CLIENTS_GOOGLE_COM.stripProtocol(),
HTTPS_CLIENTS_3_GOOGLE_COM.stripProtocol(),
Expand Down Expand Up @@ -241,8 +240,12 @@ open class SignalServiceNetworkAccess(context: Context) {
COUNTRY_CODE_UZBEKISTAN to buildGConfiguration(
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_CUBA to fConfig
COUNTRY_CODE_CUBA to fConfig,
COUNTRY_CODE_RUSSIA to fConfig
)

private val defaultCensoredConfiguration: SignalServiceConfiguration = buildGConfiguration(baseGHostConfigs)
Expand Down Expand Up @@ -323,7 +326,6 @@ open class SignalServiceNetworkAccess(context: Context) {
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 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 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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class EnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_registration_
phoneNumberInputLayout.requestFocus()
}

if (fragmentViewModel.isEnteredNumberValid(fragmentState)) {
if (fragmentViewModel.isEnteredNumberPossible(fragmentState)) {
sharedViewModel.setPhoneNumber(fragmentViewModel.parsePhoneNumber(fragmentState))
} else {
sharedViewModel.setPhoneNumber(null)
Expand Down Expand Up @@ -267,7 +267,7 @@ class EnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_registration_
}

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) {
binding.registerButton.setSpinning()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class EnterPhoneNumberViewModel : ViewModel() {
return PhoneNumberUtil.getInstance().parse(state.phoneNumber, supportedCountryPrefixes[state.countryPrefixIndex].regionCode)
}

fun isEnteredNumberValid(state: EnterPhoneNumberState): Boolean {
fun isEnteredNumberPossible(state: EnterPhoneNumberState): Boolean {
return try {
PhoneNumberUtil.getInstance().isValidNumber(parsePhoneNumber(state))
PhoneNumberUtil.getInstance().isPossibleNumber(parsePhoneNumber(state))
} catch (ex: NumberParseException) {
false
}
Expand Down

This file was deleted.

0 comments on commit c3bf563

Please sign in to comment.