| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /* _____ _
- * |_ _| |_ _ _ ___ ___ _ __ __ _
- * | | | ' \| '_/ -_) -_) ' \/ _` |_
- * |_| |_||_|_| \___\___|_|_|_\__,_(_)
- *
- * Threema for Android
- * Copyright (c) 2013-2025 Threema GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- package ch.threema.app.webviews
- import android.content.Context
- import ch.threema.android.buildActivityIntent
- import ch.threema.app.R
- import ch.threema.app.utils.ConfigUtils
- import ch.threema.app.utils.logScreenVisibility
- import ch.threema.base.utils.getThreemaLogger
- private val logger = getThreemaLogger("PrivacyPolicyActivity")
- class PrivacyPolicyActivity : SimpleWebViewActivity() {
- init {
- logScreenVisibility(logger)
- }
- override fun getWebViewTitle() = R.string.privacy_policy
- override fun getWebViewUrl(isDarkTheme: Boolean) = ConfigUtils.getPrivacyPolicyURL(
- /* context = */
- this,
- /* isDarkTheme = */
- isDarkTheme,
- )
- companion object {
- @JvmStatic
- fun createIntent(context: Context, forceDarkTheme: Boolean = false) = buildActivityIntent<PrivacyPolicyActivity>(context) {
- if (forceDarkTheme) {
- putExtra(FORCE_DARK_THEME, true)
- }
- }
- }
- }
|