Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Merge tag 'v7.18.2' into molly-7.18
Browse files Browse the repository at this point in the history
  • Loading branch information
valldrac committed Oct 1, 2024
2 parents e5c10bb + 69e1146 commit 042e6f7
Show file tree
Hide file tree
Showing 307 changed files with 9,221 additions and 6,784 deletions.
8 changes: 2 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ apply {
from("fix-profm.gradle")
}

val canonicalVersionCode = 1462
val canonicalVersionName = "7.17.5"
val canonicalVersionCode = 1465
val canonicalVersionName = "7.18.2"
val currentHotfixVersion = 0
val maxHotfixVersions = 100
val mollyRevision = 1
Expand Down Expand Up @@ -178,8 +178,6 @@ android {

applicationId = basePackageId

multiDexEnabled = true

buildConfigField("String", "SIGNAL_PACKAGE_NAME", "\"org.thoughtcrime.securesms\"")
buildConfigField("String", "SIGNAL_CANONICAL_VERSION_NAME", "\"$canonicalVersionName\"")
buildConfigField("int", "SIGNAL_CANONICAL_VERSION_CODE", "$canonicalVersionCode")
Expand Down Expand Up @@ -450,7 +448,6 @@ dependencies {
implementation(libs.androidx.compose.runtime.livedata)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.multidex)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.androidx.navigation.compose)
Expand Down Expand Up @@ -550,7 +547,6 @@ dependencies {
testImplementation(testLibs.robolectric.robolectric) {
exclude(group = "com.google.protobuf", module = "protobuf-java")
}
testImplementation(testLibs.robolectric.shadows.multidex)
testImplementation(testLibs.bouncycastle.bcprov.jdk15on) {
version {
strictly("1.70")
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.test.platform.app.InstrumentationRegistry
import com.github.difflib.DiffUtils
import com.github.difflib.UnifiedDiffUtils
import junit.framework.Assert.assertTrue
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.signal.core.util.Base64
Expand Down Expand Up @@ -40,82 +39,173 @@ class ArchiveImportExportTests {
const val TAG = "ImportExport"
const val TESTS_FOLDER = "backupTests"

val SELF_ACI = ServiceId.ACI.from(UUID(100, 100))
val SELF_PNI = ServiceId.PNI.from(UUID(101, 101))
val SELF_ACI = ServiceId.ACI.from(UUID.fromString("00000000-0000-4000-8000-000000000001"))
val SELF_PNI = ServiceId.PNI.from(UUID.fromString("00000000-0000-4000-8000-000000000002"))
val SELF_E164 = "+10000000000"
val SELF_PROFILE_KEY: ByteArray = Base64.decode("YQKRq+3DQklInaOaMcmlzZnN0m/1hzLiaONX7gB12dg=")
val MASTER_KEY = Base64.decode("sHuBMP4ToZk4tcNU+S8eBUeCt8Am5EZnvuqTBJIR4Do")
}

@Test
// @Test
fun all() {
runTests()
}

@Ignore("Just for debugging")
@Test
fun temp() {
runTests { it == "chat_item_standard_message_formatted_text_03.binproto" }
}

// Passing
// @Test
fun accountData() {
runTests { it.startsWith("account_data_") }
}

@Ignore("Just for debugging")
@Test
fun recipientContacts() {
runTests { it.startsWith("recipient_contacts_") }
fun adHocCall() {
runTests { it.startsWith("ad_hoc_call") }
}

// Passing
// @Test
fun chat() {
runTests { it.startsWith("chat_") && !it.contains("_item") }
}

// Passing
// @Test
fun chatItemContactMessage() {
runTests { it.startsWith("chat_item_contact_message_") }
}

// Passing
// @Test
fun chatItemExpirationTimerUpdate() {
runTests { it.startsWith("chat_item_expiration_timer_") }
}

// Passing
// @Test
fun chatItemGiftBadge() {
runTests { it.startsWith("chat_item_gift_badge_") }
}

@Ignore("Just for debugging")
@Test
fun recipientDistributionLists() {
runTests { it.startsWith("recipient_distribution_list_") }
fun chatItemGroupCallUpdate() {
runTests { it.startsWith("chat_item_group_call_update_") }
}

@Ignore("Just for debugging")
@Test
fun recipientGroups() {
runTests { it.startsWith("recipient_groups_") }
fun chatItemIndividualCallUpdate() {
runTests { it.startsWith("chat_item_individual_call_update_") }
}

// Passing
// @Test
fun chatItemLearnedProfileUpdate() {
runTests { it.startsWith("chat_item_learned_profile_update_") }
}

@Ignore("Just for debugging")
@Test
fun chatStandardMessageTextOnly() {
runTests { it.startsWith("chat_standard_message_text_only_") }
fun chatItemPaymentNotification() {
runTests { it.startsWith("chat_item_payment_notification_") }
}

// Passing
// @Test
fun chatItemProfileChangeUpdate() {
runTests { it.startsWith("chat_item_profile_change_update_") }
}

// Passing
// @Test
fun chatItemRemoteDelete() {
runTests { it.startsWith("chat_item_remote_delete_") }
}

// Passing
// @Test
fun chatItemSessionSwitchoverUpdate() {
runTests { it.startsWith("chat_item_session_switchover_update_") }
}

@Ignore("Just for debugging")
@Test
fun chatStandardMessageFormattedText() {
runTests { it.startsWith("chat_standard_message_formatted_text_") }
fun chatItemSimpleUpdates() {
runTests { it.startsWith("chat_item_simple_updates_") }
}

// Passing
// @Test
fun chatItemStandardMessageFormattedText() {
runTests { it.startsWith("chat_item_standard_message_formatted_text_") }
}

@Ignore("Just for debugging")
@Test
fun chatStandardMessageLongText() {
runTests { it.startsWith("chat_standard_message_long_text_") }
fun chatItemStandardMessageLongText() {
runTests { it.startsWith("chat_item_standard_message_long_text_") }
}

// Passing
// @Test
fun chatItemStandardMessageSpecialAttachments() {
runTests { it.startsWith("chat_item_standard_message_special_attachments_") }
}

// Passing
// @Test
fun chatItemStandardMessageStandardAttachments() {
runTests { it.startsWith("chat_item_standard_message_standard_attachments_") }
}

// Passing
// @Test
fun chatItemStandardMessageTextOnly() {
runTests { it.startsWith("chat_item_standard_message_text_only_") }
}

@Ignore("Just for debugging")
@Test
fun chatStandardMessageStandardAttachments() {
runTests { it.startsWith("chat_standard_message_standard_attachments_") }
fun chatItemStandardMessageWithEdits() {
runTests { it.startsWith("chat_item_standard_message_with_edits_") }
}

@Ignore("Just for debugging")
@Test
fun chatStandardMessageSpecialAttachments() {
runTests { it.startsWith("chat_standard_message_special_attachments_") }
fun chatItemStandardMessageWithQuote() {
runTests { it.startsWith("chat_item_standard_message_with_quote_") }
}

@Ignore("Just for debugging")
@Test
fun chatSimpleUpdates() {
runTests { it.startsWith("chat_simple_updates_") }
fun chatItemStickerMessage() {
runTests { it.startsWith("chat_item_sticker_message_") }
}

// Passing
// @Test
fun chatItemThreadMergeUpdate() {
runTests { it.startsWith("chat_item_thread_merge_update_") }
}

@Ignore("Just for debugging")
@Test
fun chatContactMessage() {
runTests { it.startsWith("chat_contact_message_") }
fun recipientCallLink() {
runTests { it.startsWith("recipient_call_link_") }
}

// Passing
// @Test
fun recipientContacts() {
runTests { it.startsWith("recipient_contacts_") }
}

// Passing
// @Test
fun recipientDistributionLists() {
runTests { it.startsWith("recipient_distribution_list_") }
}

// Passing
// @Test
fun recipientGroups() {
runTests { it.startsWith("recipient_groups_") }
}

private fun runTests(predicate: (String) -> Boolean = { true }) {
Expand Down Expand Up @@ -152,7 +242,7 @@ class ArchiveImportExportTests {
val message = "Some tests failed! Only $successCount/${results.size} passed. Failure details are above. Failing tests:\n$failingTestNames"

Log.d(TAG, message)
throw AssertionError(message)
throw AssertionError("Some tests failed!")
} else {
Log.d(TAG, "All ${results.size} tests passed!")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,15 @@ class AttachmentTableTest_deduping {

assertDoesNotHaveRemoteFields(id2)
assertArchiveFieldsMatch(id1, id2)

upload(id2)

assertDataFilesAreTheSame(id1, id2)
assertDataHashStartMatches(id1, id2)
assertDataHashEndMatches(id1, id2)
assertSkipTransform(id1, true)
assertSkipTransform(id2, true)
assertRemoteFieldsMatch(id1, id2)
}

// This isn't so much "desirable behavior" as it is documenting how things work.
Expand Down Expand Up @@ -653,6 +662,7 @@ class AttachmentTableTest_deduping {
}

fun upload(attachmentId: AttachmentId, uploadTimestamp: Long = System.currentTimeMillis()) {
SignalDatabase.attachments.createKeyIvIfNecessary(attachmentId)
SignalDatabase.attachments.finalizeAttachmentAfterUpload(attachmentId, createUploadResult(attachmentId, uploadTimestamp))

val attachment = SignalDatabase.attachments.getAttachment(attachmentId)!!
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,12 @@
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="false"/>

<activity android:name=".backup.v2.ui.subscription.MessageBackupsCheckoutActivity"
android:theme="@style/Theme.Signal.DayNight.NoActionBar"
android:windowSoftInputMode="adjustResize"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="false"/>

<service
android:enabled="true"
android:name=".service.webrtc.WebRtcCallService"
Expand Down
Loading

0 comments on commit 042e6f7

Please sign in to comment.