From 5488f91ad3828a45bb4db3a5ac230473237a3b70 Mon Sep 17 00:00:00 2001 From: Yoan Pintas Date: Mon, 16 Dec 2024 17:33:49 +0100 Subject: [PATCH] Update TAC and private policy URLs (#1143) --- README.md | 2 +- changelog.d/1143.misc | 1 + .../main/java/im/vector/app/config/Config.kt | 4 ++-- .../vector/app/features/home/HomeActivity.kt | 8 +------- .../features/settings/VectorSettingsUrls.kt | 7 +++---- .../features/settings/legals/ElementLegals.kt | 4 ++-- .../features/settings/legals/LegalsFragment.kt | 18 ++++-------------- 7 files changed, 14 insertions(+), 30 deletions(-) create mode 100644 changelog.d/1143.misc diff --git a/README.md b/README.md index 21fd15dfd7..9a54ef8b64 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Tchap Android -Tchap Android is an Android Matrix Client provided by [DINUM](https://tchap.beta.gouv.fr/). The app can be run on every Android devices with Android OS Lollipop and more (API 21). +Tchap Android is an Android Matrix Client provided by [DINUM](https://tchap.numerique.gouv.fr/). The app can be run on every Android devices with Android OS Lollipop and more (API 21). [Get it on Google Play](https://play.google.com/store/apps/details?id=fr.gouv.tchap.a) diff --git a/changelog.d/1143.misc b/changelog.d/1143.misc new file mode 100644 index 0000000000..307b26ddd0 --- /dev/null +++ b/changelog.d/1143.misc @@ -0,0 +1 @@ +Changement des URLs pour les CGU et la politique de confidentialité. \ No newline at end of file diff --git a/vector-config/src/main/java/im/vector/app/config/Config.kt b/vector-config/src/main/java/im/vector/app/config/Config.kt index a35c4e726d..6ad0853d0f 100644 --- a/vector-config/src/main/java/im/vector/app/config/Config.kt +++ b/vector-config/src/main/java/im/vector/app/config/Config.kt @@ -86,7 +86,7 @@ object Config { val DEBUG_ANALYTICS_CONFIG = Analytics.Enabled( postHogHost = "https://us.i.posthog.com", // TCHAP dev posthog postHogApiKey = "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // TCHAP dev posthog - policyLink = "https://tchap.beta.gouv.fr/politique-de-confidentialite", + policyLink = "https://tchap.numerique.gouv.fr/politique-de-confidentialite", sentryDSN = "", sentryEnvironment = "DEBUG" ) @@ -98,7 +98,7 @@ object Config { val RELEASE_ANALYTICS_CONFIG = Analytics.Enabled( postHogHost = "https://posthogdev.tchap.incubateur.net", // TCHAP prod posthog postHogApiKey = "phc_FFa4pkvmuWjF9nZOMmYJWUXMibuYnCnPyf3DqPGZs4L", // TCHAP prod posthog - policyLink = "https://tchap.beta.gouv.fr/politique-de-confidentialite", + policyLink = "https://tchap.numerique.gouv.fr/politique-de-confidentialite", sentryDSN = "", sentryEnvironment = "RELEASE" ) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index 180e7ebae0..3b31b57d25 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -88,7 +88,6 @@ import im.vector.app.features.spaces.invite.SpaceInviteBottomSheet import im.vector.app.features.spaces.share.ShareSpaceBottomSheet import im.vector.app.features.themes.ThemeUtils import im.vector.app.features.usercode.UserCodeActivity -import im.vector.app.features.webview.VectorWebViewActivity import im.vector.app.features.workers.signout.ServerBackupStatusViewModel import im.vector.lib.core.utils.compat.getParcelableExtraCompat import im.vector.lib.strings.CommonStrings @@ -237,12 +236,7 @@ class HomeActivity : when (sharedAction) { // TCHAP Custom implementation is HomeActivitySharedAction.InviteByEmail -> Unit // no-op - HomeActivitySharedAction.OpenTermAndConditions -> { - // TCHAP the Term And Conditions url is detected as a permalink (same prefix), which make the application fail to open it from - // ChromeCustomTab, so we open it here directly in a WebView - val intent = VectorWebViewActivity.getIntent(this, VectorSettingsUrls.TAC, getString(CommonStrings.settings_app_term_conditions)) - startActivity(intent) - } + HomeActivitySharedAction.OpenTermAndConditions -> openUrlInChromeCustomTab(this, null, VectorSettingsUrls.TAC) HomeActivitySharedAction.OpenBugReport -> { views.drawerLayout.closeDrawer(GravityCompat.START) bugReporter.openBugReportScreen(this, ReportType.BUG_REPORT, false) diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsUrls.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsUrls.kt index dbca1ed7c9..b8e377ffe4 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsUrls.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsUrls.kt @@ -17,10 +17,9 @@ package im.vector.app.features.settings object VectorSettingsUrls { - // TCHAP Redirect to Tchap FAQ - const val HELP = "https://aide.tchap.beta.gouv.fr" + const val HELP = "https://aide.tchap.beta.gouv.fr" // TCHAP Redirect to FAQ const val COPYRIGHT = "https://element.io/copyright" - const val TAC = "https://www.tchap.gouv.fr/tac.html" - const val PRIVACY_POLICY = "https://element.io/privacy" + const val TAC = "https://tchap.numerique.gouv.fr/cgu/" // TCHAP Redirect to CGU + const val PRIVACY_POLICY = "https://tchap.numerique.gouv.fr/politique-de-confidentialite" // TCHAP Redirect to privacy const val THIRD_PARTY_LICENSES = "file:///android_asset/open_source_licenses.html" } diff --git a/vector/src/main/java/im/vector/app/features/settings/legals/ElementLegals.kt b/vector/src/main/java/im/vector/app/features/settings/legals/ElementLegals.kt index 81c5041f91..703f617f14 100644 --- a/vector/src/main/java/im/vector/app/features/settings/legals/ElementLegals.kt +++ b/vector/src/main/java/im/vector/app/features/settings/legals/ElementLegals.kt @@ -30,11 +30,11 @@ class ElementLegals @Inject constructor( */ fun getData(): List { return listOf( - ServerPolicy(stringProvider.getString(CommonStrings.settings_app_term_conditions), VectorSettingsUrls.TAC) + ServerPolicy(stringProvider.getString(CommonStrings.settings_app_term_conditions), VectorSettingsUrls.TAC), // TCHAP Hidden in Tchap // ServerPolicy(stringProvider.getString(CommonStrings.settings_copyright), VectorSettingsUrls.COPYRIGHT), // ServerPolicy(stringProvider.getString(CommonStrings.settings_acceptable_use_policy), VectorSettingsUrls.ACCEPTABLE_USE_POLICY), -// ServerPolicy(stringProvider.getString(CommonStrings.settings_privacy_policy), VectorSettingsUrls.PRIVACY_POLICY) + ServerPolicy(stringProvider.getString(CommonStrings.settings_privacy_policy), VectorSettingsUrls.PRIVACY_POLICY) ) } } diff --git a/vector/src/main/java/im/vector/app/features/settings/legals/LegalsFragment.kt b/vector/src/main/java/im/vector/app/features/settings/legals/LegalsFragment.kt index 937220c4c5..d668e8783f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/legals/LegalsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/legals/LegalsFragment.kt @@ -33,7 +33,6 @@ import im.vector.app.databinding.FragmentGenericRecyclerBinding import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.discovery.ServerPolicy import im.vector.app.features.settings.VectorSettingsUrls -import im.vector.app.features.webview.VectorWebViewActivity import im.vector.lib.strings.CommonStrings import javax.inject.Inject @@ -94,19 +93,10 @@ class LegalsFragment : private fun openUrl(url: String) { if (firstThrottler.canHandle() is FirstThrottler.CanHandlerResult.Yes) { - when { - url.startsWith("file://") -> { - activity?.displayInWebView(url) - } - url == VectorSettingsUrls.TAC -> { - // TCHAP the Term And Conditions url is detected as a permalink (same prefix), which make the application fail to open it from - // ChromeCustomTab, so we open it here directly in a WebView - val intent = VectorWebViewActivity.getIntent(requireActivity(), url, resources.getString(CommonStrings.settings_app_term_conditions)) - activity?.startActivity(intent) - } - else -> { - openUrlInChromeCustomTab(requireContext(), null, url) - } + if (url.startsWith("file://")) { + activity?.displayInWebView(url) + } else { + openUrlInChromeCustomTab(requireContext(), null, url) } } }