diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 975b1879d7..8e838b8af4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,7 +8,8 @@ on:
# Enrich gradle.properties for CI/CD
env:
- GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
+ # Tchap : up Xmx TO 4096 to achieve build in CI
+ GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx4096m" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
jobs:
diff --git a/TCHAP_CHANGES.md b/TCHAP_CHANGES.md
index 6d86336885..a9fcfe6c76 100644
--- a/TCHAP_CHANGES.md
+++ b/TCHAP_CHANGES.md
@@ -1,3 +1,17 @@
+Changes in Tchap 2.9.1 (2023-07-27)
+===================================
+
+Improvements 🙌
+--------------
+ - Amélioration UX, wording et organisation des settings sécurité (partie II, multidevice) (#940) ([#940](https://github.com/tchapgouv/tchap-android-v2/issues/940))
+ - Supprimer le blocage d'envoi de messages chiffrés aux appareils non vérifiés (945) ([#945](https://github.com/tchapgouv/tchap-android-v2/issues/945))
+
+Bugfixes 🐛
+----------
+ - Correction du test de Push Notification non adapté à Tchap #950 ([#950](https://github.com/tchapgouv/tchap-android-v2/issues/950))
+ - Problème de copie du code de récupération après génération ([#953](https://github.com/tchapgouv/tchap-android-v2/issues/953))
+
+
Changes in Tchap 2.9.0 (2023-07-06)
===================================
diff --git a/library/ui-strings/src/main/res/values-fr/strings.xml b/library/ui-strings/src/main/res/values-fr/strings.xml
index a3d7edbb81..91efbce467 100644
--- a/library/ui-strings/src/main/res/values-fr/strings.xml
+++ b/library/ui-strings/src/main/res/values-fr/strings.xml
@@ -676,7 +676,7 @@
Configurer les notifications silencieuses
Choisir la couleur de la LED, les vibrations, le son…
Clés Tchap
- Gérer la sauvegarde
+ Récupérer mes messages
Silencieuse
Veuillez saisir une phrase secrète
La phrase secrète est trop faible
diff --git a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt
index e3595f6618..d5ffd0d3d6 100644
--- a/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt
+++ b/matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt
@@ -1158,7 +1158,9 @@ internal class RealmCryptoStore @Inject constructor(
}
)
return Transformations.map(liveData) {
- it.firstOrNull() ?: false
+ // Tchap : force to false to avoid "Never send messages to non verified devices"
+ // it.firstOrNull() ?: false
+ false
}
}
diff --git a/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt b/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt
index b242a3ed34..a565773bf1 100644
--- a/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt
+++ b/matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/store/RustCryptoStore.kt
@@ -372,7 +372,9 @@ internal class RustCryptoStore @Inject constructor(
}
)
return Transformations.map(liveData) {
- it.firstOrNull() ?: false
+ // Tchap : force to false to avoid "Never send messages to non verified devices"
+ // it.firstOrNull() ?: false
+ false
}
}
diff --git a/towncrier.toml b/towncrier.toml
index c31bc93eb6..20b847b1ae 100644
--- a/towncrier.toml
+++ b/towncrier.toml
@@ -1,5 +1,5 @@
[tool.towncrier]
- version = "2.9.0"
+ version = "2.9.1"
directory = "changelog.d"
filename = "TCHAP_CHANGES.md"
name = "Changes in Tchap"
diff --git a/vector-app/build.gradle b/vector-app/build.gradle
index 05d03029e6..72a0b418f2 100644
--- a/vector-app/build.gradle
+++ b/vector-app/build.gradle
@@ -37,7 +37,7 @@ ext.versionMinor = 9
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
-ext.versionPatch = 0
+ext.versionPatch = 1
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'
diff --git a/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt b/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt
index d99afa59f7..c895338392 100644
--- a/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt
+++ b/vector-app/src/fdroid/java/im/vector/app/push/fcm/FdroidNotificationTroubleshootTestManagerFactory.kt
@@ -29,7 +29,7 @@ import im.vector.app.features.settings.troubleshoot.TestCurrentUnifiedPushDistri
import im.vector.app.features.settings.troubleshoot.TestDeviceSettings
import im.vector.app.features.settings.troubleshoot.TestEndpointAsTokenRegistration
import im.vector.app.features.settings.troubleshoot.TestNotification
-import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway
+// import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway // Tchap : remove
import im.vector.app.features.settings.troubleshoot.TestPushRulesSettings
import im.vector.app.features.settings.troubleshoot.TestSystemSettings
import im.vector.app.features.settings.troubleshoot.TestUnifiedPushEndpoint
@@ -47,7 +47,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor(
private val testUnifiedPushEndpoint: TestUnifiedPushEndpoint,
private val testAvailableUnifiedPushDistributors: TestAvailableUnifiedPushDistributors,
private val testEndpointAsTokenRegistration: TestEndpointAsTokenRegistration,
- private val testPushFromPushGateway: TestPushFromPushGateway,
+ // private val testPushFromPushGateway: TestPushFromPushGateway, // Tchap : remove
private val testAutoStartBoot: TestAutoStartBoot,
private val testBackgroundRestrictions: TestBackgroundRestrictions,
private val testBatteryOptimization: TestBatteryOptimization,
@@ -73,7 +73,7 @@ class FdroidNotificationTroubleshootTestManagerFactory @Inject constructor(
mgr.addTest(testUnifiedPushGateway)
mgr.addTest(testUnifiedPushEndpoint)
mgr.addTest(testEndpointAsTokenRegistration)
- mgr.addTest(testPushFromPushGateway)
+// mgr.addTest(testPushFromPushGateway) // Tchap : remove
}
mgr.addTest(testNotification)
return mgr
diff --git a/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt b/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt
index 1db26ad3a8..6ebfc78c79 100644
--- a/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt
+++ b/vector-app/src/gplay/java/im/vector/app/push/fcm/GoogleNotificationTroubleshootTestManagerFactory.kt
@@ -26,7 +26,7 @@ import im.vector.app.features.settings.troubleshoot.TestCurrentUnifiedPushDistri
import im.vector.app.features.settings.troubleshoot.TestDeviceSettings
import im.vector.app.features.settings.troubleshoot.TestEndpointAsTokenRegistration
import im.vector.app.features.settings.troubleshoot.TestNotification
-import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway
+// import im.vector.app.features.settings.troubleshoot.TestPushFromPushGateway // Tchap : remove
import im.vector.app.features.settings.troubleshoot.TestPushRulesSettings
import im.vector.app.features.settings.troubleshoot.TestSystemSettings
import im.vector.app.features.settings.troubleshoot.TestUnifiedPushEndpoint
@@ -50,7 +50,7 @@ class GoogleNotificationTroubleshootTestManagerFactory @Inject constructor(
private val testUnifiedPushEndpoint: TestUnifiedPushEndpoint,
private val testAvailableUnifiedPushDistributors: TestAvailableUnifiedPushDistributors,
private val testEndpointAsTokenRegistration: TestEndpointAsTokenRegistration,
- private val testPushFromPushGateway: TestPushFromPushGateway,
+ // private val testPushFromPushGateway: TestPushFromPushGateway, // Tchap : remove
private val testNotification: TestNotification,
private val vectorFeatures: VectorFeatures,
) : NotificationTroubleshootTestManagerFactory {
@@ -75,7 +75,7 @@ class GoogleNotificationTroubleshootTestManagerFactory @Inject constructor(
mgr.addTest(testUnifiedPushEndpoint)
mgr.addTest(testEndpointAsTokenRegistration)
}
- mgr.addTest(testPushFromPushGateway)
+ // mgr.addTest(testPushFromPushGateway) // Tchap : remove
mgr.addTest(testNotification)
return mgr
}
diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt
index 73ccef10c8..ee00951725 100644
--- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt
+++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt
@@ -178,8 +178,9 @@ class KeysBackupSettingsRecyclerViewController @Inject constructor(
textButton1(host.stringProvider.getString(R.string.keys_backup_settings_restore_backup_button))
clickOnButton1 { host.listener?.didSelectRestoreMessageRecovery() }
- textButton2(host.stringProvider.getString(R.string.keys_backup_settings_delete_backup_button))
- clickOnButton2 { host.listener?.didSelectDeleteSetupMessageRecovery() }
+ // Tchap : hide "Suppress backup" button
+// textButton2(host.stringProvider.getString(R.string.keys_backup_settings_delete_backup_button))
+// clickOnButton2 { host.listener?.didSelectDeleteSetupMessageRecovery() }
} else {
textButton1(host.stringProvider.getString(R.string.keys_backup_setup))
clickOnButton1 { host.listener?.didSelectSetupMessageRecovery() }
diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt
index bed4d58b1e..f8750710e0 100644
--- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSaveRecoveryKeyFragment.kt
@@ -18,6 +18,9 @@ package im.vector.app.features.crypto.recover
import android.app.Activity
import android.content.ActivityNotFoundException
+import android.content.ClipData
+import android.content.ClipboardManager
+import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
@@ -93,7 +96,8 @@ class BootstrapSaveRecoveryKeyFragment :
}
private val copyStartForActivityResult = registerStartForActivityResult { activityResult ->
- if (activityResult.resultCode == Activity.RESULT_OK) {
+ // Tchap : accept to close sheet even if result is RESULT_CANCELED. The Recovery code is in the clipboard.
+ if (activityResult.resultCode == Activity.RESULT_OK || activityResult.resultCode == Activity.RESULT_CANCELED) {
// Tchap : Close the dialog without having to tap "Continue"
sharedViewModel.handle(BootstrapActions.Completed)
}
@@ -103,6 +107,11 @@ class BootstrapSaveRecoveryKeyFragment :
val recoveryKey = state.recoveryKeyCreationInfo?.recoveryKey?.formatRecoveryKey()
?: return@withState
+ // Tchap : copy recovery key to clipboard right now after "Copy" button is tapped.
+ val clipboard = requireContext().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
+ val clip = ClipData.newPlainText("", recoveryKey)
+ clipboard.setPrimaryClip(clip)
+
startSharePlainTextIntent(
requireContext(),
copyStartForActivityResult,
diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt
index 36c9f81886..19933158e3 100644
--- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt
+++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt
@@ -205,30 +205,32 @@ class RoomProfileController @Inject constructor(
host.callback?.openGlobalBlockSettings()
}
}
- } else {
- // per room setting is available
- val shouldBlockUnverified = data.encryptToVerifiedDeviceOnly.invoke()
- formSwitchItem {
- id("send_to_unverified")
- enabled(shouldBlockUnverified != null)
- title(host.stringProvider.getString(R.string.encryption_never_send_to_unverified_devices_in_room))
-
- switchChecked(shouldBlockUnverified ?: false)
-
- apply {
- if (shouldBlockUnverified == true && data.unverifiedDevicesInTheRoom.invoke() == true) {
- summary(
- host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt)
- )
- } else {
- summary(null)
- }
- }
- listener { value ->
- host.callback?.setEncryptedToVerifiedDevicesOnly(value)
- }
- }
}
+ // Tchap : don't display option "Never send messages to unverified devices in room"
+// else {
+// // per room setting is available
+// val shouldBlockUnverified = data.encryptToVerifiedDeviceOnly.invoke()
+// formSwitchItem {
+// id("send_to_unverified")
+// enabled(shouldBlockUnverified != null)
+// title(host.stringProvider.getString(R.string.encryption_never_send_to_unverified_devices_in_room))
+//
+// switchChecked(shouldBlockUnverified ?: false)
+//
+// apply {
+// if (shouldBlockUnverified == true && data.unverifiedDevicesInTheRoom.invoke() == true) {
+// summary(
+// host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt)
+// )
+// } else {
+// summary(null)
+// }
+// }
+// listener { value ->
+// host.callback?.setEncryptedToVerifiedDevicesOnly(value)
+// }
+// }
+// }
}
}
// More
diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt
index 2f1b521d53..4ce1b260c4 100644
--- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt
+++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt
@@ -292,7 +292,7 @@ class RoomProfileViewModel @AssistedInject constructor(
private fun setEncryptToVerifiedDeviceOnly(enabled: Boolean) {
session.coroutineScope.launch {
- session.cryptoService().setRoomBlockUnverifiedDevices(room.roomId, enabled)
+ session.cryptoService().setRoomBlockUnverifiedDevices(room.roomId, enabled and false) // Tchap : force to false to deactivate "Never send messages to unverified devices in room"
}
}
diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt
index e08cd1d6f7..2126902858 100644
--- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt
@@ -233,7 +233,18 @@ class VectorSettingsSecurityPrivacyFragment :
} else {
// just hide all, you can't setup from here
// you should synchronize to get gossips
- secureBackupCategory.isVisible = false
+ // Tchap : here, the section is hidden on Element.
+ // In Tchap, we want to show it.
+ secureBackupCategory.isVisible = true
+ secureBackupPreference.title = getString(R.string.settings_secure_backup_enter_to_setup)
+ secureBackupPreference.onPreferenceClickListener = Preference.OnPreferenceClickListener {
+ vectorActivity.let {
+ it.navigator.requestSelfSessionVerification(it)
+ }
+ true
+ }
+ // Tchap : remove "Manage backup" button because Secure backup is not activated
+ manageBackupPref.isVisible = false
}
} else {
// so here we know that 4S is setup
@@ -372,7 +383,7 @@ class VectorSettingsSecurityPrivacyFragment :
mCrossSigningStatePreference.summary = getString(R.string.encryption_information_dg_xsigning_trusted)
}
xSigningIsEnableInAccount -> {
- mCrossSigningStatePreference.setIcon(R.drawable.ic_shield_black)
+ mCrossSigningStatePreference.setIcon(R.drawable.ic_tchap_cancel) // Tchpa icon
mCrossSigningStatePreference.summary = getString(R.string.encryption_information_dg_xsigning_not_trusted)
}
else -> {
diff --git a/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt b/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt
index dde32c1da0..6e8eef6a58 100644
--- a/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt
+++ b/vector/src/main/java/im/vector/app/features/settings/crosssigning/CrossSigningSettingsController.kt
@@ -50,14 +50,15 @@ class CrossSigningSettingsController @Inject constructor(
titleIconResourceId(R.drawable.ic_shield_trusted)
title(host.stringProvider.getString(R.string.encryption_information_dg_xsigning_complete).toEpoxyCharSequence())
}
- genericButtonItem {
- id("Reset")
- text(host.stringProvider.getString(R.string.reset_cross_signing))
- textColor(host.colorProvider.getColor(R.color.palette_tchap_coral)) // Tchap
- buttonClickAction {
- host.interactionListener?.didTapInitializeCrossSigning()
- }
- }
+ // Tchap : don't display "Reset cross-signing" button
+// genericButtonItem {
+// id("Reset")
+// text(host.stringProvider.getString(R.string.reset_cross_signing))
+// textColor(host.colorProvider.getColor(R.color.palette_tchap_coral)) // Tchap
+// buttonClickAction {
+// host.interactionListener?.didTapInitializeCrossSigning()
+// }
+// }
}
data.xSigningKeysAreTrusted -> {
genericItem {
@@ -77,7 +78,7 @@ class CrossSigningSettingsController @Inject constructor(
data.xSigningIsEnableInAccount -> {
genericItem {
id("enable")
- titleIconResourceId(R.drawable.ic_shield_black)
+ titleIconResourceId(R.drawable.ic_tchap_cancel) // Tchap icon
title(host.stringProvider.getString(R.string.encryption_information_dg_xsigning_not_trusted).toEpoxyCharSequence())
}
genericButtonItem {
diff --git a/vector/src/main/res/drawable/ic_tchap_cancel.xml b/vector/src/main/res/drawable/ic_tchap_cancel.xml
new file mode 100644
index 0000000000..afde45223d
--- /dev/null
+++ b/vector/src/main/res/drawable/ic_tchap_cancel.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/vector/src/main/res/xml/vector_settings_security_privacy.xml b/vector/src/main/res/xml/vector_settings_security_privacy.xml
index 46b0c3ee37..5897cd7a12 100644
--- a/vector/src/main/res/xml/vector_settings_security_privacy.xml
+++ b/vector/src/main/res/xml/vector_settings_security_privacy.xml
@@ -11,6 +11,12 @@
android:focusable="false"
android:persistent="false"
android:summary="@string/settings_secure_backup_section_info" />
+
-
-