Skip to content

Commit

Permalink
Merge branch 'release/2.11.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed May 30, 2024
2 parents d0a57f2 + d79f9fb commit ae1101f
Show file tree
Hide file tree
Showing 133 changed files with 315 additions and 309 deletions.
8 changes: 8 additions & 0 deletions TCHAP_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Changes in Tchap 2.11.6 (2024-05-30)
====================================

Other changes
-------------
- Changement du texte d'alerte affiché lors de la première utilisation du partage de position en temps réel. ([#1057](https://github.com/tchapgouv/tchap-android/issues/1057))


Changes in Tchap 2.11.5 (2024-05-23)
====================================

Expand Down
2 changes: 1 addition & 1 deletion coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ task generateCoverageReport(type: JacocoReport) {
task unitTestsWithCoverage(type: GradleBuild) {
// the 7.1.3 android gradle plugin has a bug where enableTestCoverage generates invalid coverage
startParameter.projectProperties.coverage = "false"
// Tchap: Specify variant for every module
// TCHAP Specify variant for every module
tasks = [/*':matrix-sdk-android:testDebugUnitTest',*/ ':vector:testGplayBtchapWithdmvoipWithoutpinningDebugUnitTest', ':vector-app:testGplayBtchapWithdmvoipWithoutpinningDebugUnitTest', ':vector-config:testBtchapWithdmvoipDebugUnitTest']
}

Expand Down
2 changes: 1 addition & 1 deletion library/attachment-viewer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
}
}

// Tchap: Add tchap flavors
// TCHAP Add tchap flavors
// The 'target' dimension permits to specify which platform are used
flavorDimensions = ["target"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AudioPicker : Picker<MultiPickerAudioType>() {
* Returns selected audio files or empty list if user did not select any files.
*/
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerAudioType> {
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
return getSelectedUriList(context, data).mapNotNull { selectedUri ->
selectedUri.toMultiPickerAudioType(context)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class FilePicker : Picker<MultiPickerBaseType>() {
* Returns selected files or empty list if user did not select any files.
*/
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerBaseType> {
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
return getSelectedUriList(context, data).mapNotNull { selectedUri ->
val type = context.contentResolver.getType(selectedUri)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ImagePicker : Picker<MultiPickerImageType>() {
* Returns selected image files or empty list if user did not select any files.
*/
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerImageType> {
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
return getSelectedUriList(context, data).mapNotNull { selectedUri ->
selectedUri.toMultiPickerImageType(context)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MediaPicker : Picker<MultiPickerBaseMediaType>() {
* Returns selected image/video files or empty list if user did not select any files.
*/
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerBaseMediaType> {
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
return getSelectedUriList(context, data).mapNotNull { selectedUri ->
val mimeType = context.contentResolver.getType(selectedUri)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class Picker<T> {
uriList.forEach {
for (resolveInfo in resInfoList) {
val packageName: String = resolveInfo.activityInfo.packageName
// Tchap: Replace implicit intent by an explicit to fix crash on some devices like Xiaomi.
// TCHAP Replace implicit intent by an explicit to fix crash on some devices like Xiaomi.
try {
context.grantUriPermission(packageName, it, Intent.FLAG_GRANT_READ_URI_PERMISSION)
} catch (e: Exception) {
Expand Down Expand Up @@ -113,7 +113,7 @@ abstract class Picker<T> {
}
}
}
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
val packageName = context.applicationContext.packageName
return selectedUriList.onEach { context.grantUriPermission(packageName, it, Intent.FLAG_GRANT_READ_URI_PERMISSION) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class VideoPicker : Picker<MultiPickerVideoType>() {
* Returns selected video files or empty list if user did not select any files.
*/
override fun getSelectedFiles(context: Context, data: Intent?): List<MultiPickerVideoType> {
// Tchap: Grant permission to access the selected file.
// TCHAP Grant permission to access the selected file.
return getSelectedUriList(context, data).mapNotNull { selectedUri ->
selectedUri.toMultiPickerVideoType(context)
}
Expand Down
2 changes: 1 addition & 1 deletion library/ui-strings/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@
<string name="time_unit_minute_short">min</string>
<string name="time_unit_hour_short">h</string>
<string name="live_location_labs_promotion_switch_title">Activer le partage de localisation</string>
<string name="live_location_labs_promotion_description">Attention : c\'est une fonctionnalité expérimentale qui utilise une implémentation temporaire. Cela implique que vous ne pourrez pas supprimer votre historique de positions, et les utilisateurs avancés pourront voir votre historique de positions même après avoir arrêter le partage de votre position en continu dans ce salon.</string>
<string name="live_location_labs_promotion_description">Attention : l’historique des positions partagées sera accessible aux autres membres du salon même après avoir arrêté le partage.</string> <!-- Tchap: Custom string -->
<string name="live_location_labs_promotion_title">Partage de position en continu</string>
<string name="settings_troubleshoot_test_current_gateway">Passerelle actuelle : %s</string>
<string name="settings_troubleshoot_test_current_gateway_title">Passerelle</string>
Expand Down
2 changes: 1 addition & 1 deletion library/ui-styles/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
}
}

// Tchap: Add tchap flavors
// TCHAP Add tchap flavors
// The 'target' dimension permits to specify which platform are used
flavorDimensions = ["target"]

Expand Down
2 changes: 1 addition & 1 deletion matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ dependencies {
// - https://github.com/square/okhttp/issues/3278
// - https://github.com/square/okhttp/issues/4455
// - https://github.com/square/okhttp/issues/3146
// Tchap: Use api instead of implementation to share these dependencies with the other modules
// TCHAP Use api instead of implementation to share these dependencies with the other modules
api(platform("com.squareup.okhttp3:okhttp-bom:4.10.0"))
api 'com.squareup.okhttp3:okhttp'
api 'com.squareup.okhttp3:logging-interceptor'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class CommonTestHelper internal constructor(context: Context, val cryptoConfig:
applicationFlavor = "TestFlavor",
roomDisplayNameFallbackProvider = TestRoomDisplayNameFallbackProvider(),
syncConfig = SyncConfig(longPollTimeout = 5_000L),
// Tchap: Do not limit here key requests to my devices to unblock crypto tests
// TCHAP Do not limit here key requests to my devices to unblock crypto tests
cryptoConfig = MXCryptoConfig(limitRoomKeyRequestsToMyDevices = false),
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class RealmSessionStoreMigration43Test {
realm?.close()
}

// Tchap: Use custom realm database
// TCHAP Use custom realm database
@Test
fun migrationShouldBeNeeed() {
val realmName = "tchap_session_41.realm"
Expand All @@ -76,7 +76,7 @@ class RealmSessionStoreMigration43Test {
}
}

// Tchap: Use custom realm database
// TCHAP Use custom realm database
// Database key for alias `session_db_feb3823dd11e8b4b0b19d5d1d9e3b864`: 2948ff8106ad80ca8aeba7ef59775075258d8805f9f6eb306add6c3097154bf5c99bbc965931a29e4512f0b3981d3a562c4c86b860846bac2312e1ab61026762
// $167541532417nKwjC:agent2.tchap.incubateur.net
// $167541543920SxkBP:agent2.tchap.incubateur.net
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SessionSanityMigrationTest {
realm?.close()
}

// Tchap: use custom realm database
// TCHAP use custom realm database
@Test
fun sessionDatabaseShouldMigrateGracefully() {
val realmName = "tchap_session_41.realm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class TimelineForwardPaginationTest : InstrumentedTest {
snapshot.groupingBy { it -> it.root.type }.eachCountTo(snapshotTypes)
// Some state events on room creation
assertEquals("m.room.name", 1, snapshotTypes.remove("m.room.name"))
// Tchap: guest_access don't used (TimelineDisplayableEvents.kt)
// TCHAP guest_access don't used (TimelineDisplayableEvents.kt)
// assertEquals("m.room.guest_access", 1, snapshotTypes.remove("m.room.guest_access"))
assertEquals("m.room.history_visibility", 1, snapshotTypes.remove("m.room.history_visibility"))
assertEquals("m.room.join_rules", 1, snapshotTypes.remove("m.room.join_rules"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal class DefaultRegistrationWizard(
private suspend fun sendThreePid(threePid: RegisterThreePid): RegistrationResult {
val safeSession = pendingSessionData.currentSession ?: throw IllegalStateException("developer error, call createAccount() method first")

// Tchap: add a specific nextLink requires by Tchap registration process.
// TCHAP add a specific nextLink requires by Tchap registration process.
val hsUri = pendingSessionData.homeServerConnectionConfig.homeServerUri
val isUri = pendingSessionData.homeServerConnectionConfig.identityServerUri
val nextLink = "$hsUri#/register?client_secret=${pendingSessionData.clientSecret}" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.matrix.android.sdk.internal.session

import dagger.BindsInstance
import dagger.Component
import fr.gouv.tchap.android.sdk.internal.auth.TchapAccountValidityModule // Tchap: forgotten module in Element. Made Variant with RustCrypto to fail.
import fr.gouv.tchap.android.sdk.internal.auth.TchapAccountValidityModule // TCHAP forgotten module in Element. Made Variant with RustCrypto to fail.
import org.matrix.android.sdk.api.MatrixCoroutineDispatchers
import org.matrix.android.sdk.api.auth.data.SessionParams
import org.matrix.android.sdk.api.securestorage.SecureStorageModule
Expand Down Expand Up @@ -70,7 +70,7 @@ import org.matrix.android.sdk.internal.util.system.SystemModule
@Component(
dependencies = [MatrixComponent::class],
modules = [
TchapAccountValidityModule::class, // Tchap: forgotten module in Element. Made Variant with RustCrypto to fail.
TchapAccountValidityModule::class, // TCHAP forgotten module in Element. Made Variant with RustCrypto to fail.
SessionModule::class,
RoomModule::class,
SyncModule::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
.also {
Timber.e("## Send: Work cancelled by user")

// Tchap: Revoke read permission to the local file.
// TCHAP Revoke read permission to the local file.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.revokeUriPermission(context.packageName, params.attachment.queryUri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
} else {
Expand Down Expand Up @@ -408,7 +408,7 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
return Result.success(WorkerParamsFactory.toData(sendParams)).also {
Timber.v("## handleSuccess $attachmentUrl, work is stopped $isStopped")

// Tchap: Revoke read permission to the local file.
// TCHAP Revoke read permission to the local file.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.revokeUriPermission(context.packageName, params.attachment.queryUri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ internal class RoomSummaryDataSource @Inject constructor(
RoomCategoryFilter.ONLY_ROOMS -> query.equalTo(RoomSummaryEntityFields.IS_DIRECT, false)
RoomCategoryFilter.ONLY_WITH_NOTIFICATIONS -> query.greaterThan(RoomSummaryEntityFields.NOTIFICATION_COUNT, 0)
RoomCategoryFilter.ALL -> {
// Tchap: we ignore DMs with directUserId different from a matrix id.
// TCHAP we ignore DMs with directUserId different from a matrix id.
// directUserId could be an email if the user has no account and he was invited by email.
query.beginGroup()
query.beginGroup()
Expand Down
2 changes: 1 addition & 1 deletion tools/danger/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if (github.requested_reviewers.users.length == 0 && !pr.draft) {
}

// Check that translations have not been modified by developers
// Tchap: deactivate translation file checking.
// TCHAP deactivate translation file checking.
//if (user != "RiotTranslateBot") {
// if (editedFiles.some(file => file.endsWith("strings.xml") && !file.endsWith("values/strings.xml"))) {
// fail("Some translation files have been edited. Only user `RiotTranslateBot` (i.e. translations coming from Weblate) is allowed to do that.\nPlease read more about translations management [in the doc](https://github.com/element-hq/element-android/blob/develop/CONTRIBUTING.md#internationalisation).")
Expand Down
2 changes: 1 addition & 1 deletion towncrier.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.towncrier]
version = "2.11.5"
version = "2.11.6"
directory = "changelog.d"
filename = "TCHAP_CHANGES.md"
name = "Changes in Tchap"
Expand Down
Loading

0 comments on commit ae1101f

Please sign in to comment.