/*
- * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
import android.app.Dialog
import android.content.Intent
-import android.content.res.Configuration
import android.os.Bundle
import android.webkit.WebResourceRequest
import android.webkit.WebResourceResponse
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment
-import androidx.webkit.WebSettingsCompat
import androidx.webkit.WebViewAssetLoader
-import androidx.webkit.WebViewFeature
import com.stoutner.privacycell.R
// Get a handle for the WebView.
webView = alertDialog.findViewById(R.id.webview)!!
- // Get the current theme status.
- val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
- // Check to see if the app is in night mode.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES && WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { // The app is in night mode.
- // Apply the dark WebView theme.
- WebSettingsCompat.setForceDark(webView.settings, WebSettingsCompat.FORCE_DARK_ON)
- }
-
// Create a WebView asset loader.
val webViewAssetLoader = WebViewAssetLoader.Builder().addPathHandler("/assets/", WebViewAssetLoader.AssetsPathHandler(requireContext())).build()
// Save the scroll position.
savedInstanceState.putInt(SCROLL_Y, webView.scrollY)
}
-}
\ No newline at end of file
+}
<string name="monitoring">Überwachung</string>
<string name="realtime_monitoring">Echtzeit-Überwachung</string>
<string name="realtime_monitoring_summary">Plaziert ein Icon in der Statusleiste, das die Überwachung der Mobilfunk-Verbindung anzeigt.</string>
+ <string name="notification_permission_denied">Die Benachrichtigungs-Berechtigung für Privacy Cell wurde abgelehnt. Daher werden derzeit keine Benachrichtigungen angezeigt.</string>
<string name="secure_network_notification">Benachrichtigung über sicheres Netzwerk</string>
<string name="insecure_network_notification">Benachrichtigung über unsicheres Netzwerk</string>
<string name="antiquated_network_notification">Benachrichtigung über veraltetes Netzwerk</string>
<string name="monitoring">Supervision</string>
<string name="realtime_monitoring">Supervision en temps-réel</string>
<string name="realtime_monitoring_summary">Placez une icône dans la barre d\'état qui surveille le réseau cellulaire.</string>
+ <string name="notification_permission_denied">L\'autorisation d\'afficher les notifications est actuellement refusée, les notifications ne seront donc pas affichées.</string>
<string name="secure_network_notification">Notification de réseau sécurisé</string>
<string name="insecure_network_notification">Notification de réseau non sécurisé</string>
<string name="antiquated_network_notification">Notification de réseau obsolète</string>
<string name="monitoring">Monitoraggio</string>
<string name="realtime_monitoring">Monitoraggio in tempo reale</string>
<string name="realtime_monitoring_summary">Aggiunge un\'icona nella barra di stato che monitora la rete cellulare.</string>
+ <string name="notification_permission_denied">L\'autorizzazione "Post Notification" non è stata al momento concessa per cui le notifiche non saranno visualizzate.</string>
<string name="secure_network_notification">Notifica di rete sicura</string>
<string name="insecure_network_notification">Notifica di rete insicura</string>
<string name="antiquated_network_notification">Notifiche di Rete Antiquata</string>