X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyCell.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacycell%2Fdialogs%2FWebViewDialog.kt;h=3b448bd666f0e75b6fd84902884e4abe3aa5f0a1;hp=0559d459d0ecd21e59a6b2c76dc77eb8cd813c0d;hb=20a6dc6adf6f00afe244596b87c96361d040989f;hpb=8484f5cbc7f74e008624d0cd13af4a6f964ee516 diff --git a/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt b/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt index 0559d45..3b448bd 100644 --- a/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt +++ b/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Privacy Browser. If not, see . + * along with Privacy Cell. If not, see . */ package com.stoutner.privacycell.dialogs @@ -48,6 +48,32 @@ class WebViewDialog : DialogFragment() { const val CHANGELOG = 2 const val LICENSES = 3 const val CONTRIBUTORS = 4 + const val STINGRAY = 5 + const val NETWORK_UNKNOWN = 6 + const val NETWORK_GPRS = 7 + const val NETWORK_EDGE = 8 + const val NETWORK_UMTS = 9 + const val NETWORK_CDMA = 10 + const val NETWORK_EVDO_0 = 11 + const val NETWORK_EVDO_A = 12 + const val NETWORK_1xRTT = 13 + const val NETWORK_HSDPA = 14 + const val NETWORK_HSUPA = 15 + const val NETWORK_HSPA = 16 + const val NETWORK_IDEN = 17 + const val NETWORK_EVDO_B = 18 + const val NETWORK_LTE = 19 + const val NETWORK_EHRPD = 20 + const val NETWORK_HSPAP = 21 + const val NETWORK_GSM = 22 + const val NETWORK_TD_SCDMA = 23 + const val NETWORK_IWLAN = 24 + const val NETWORK_NR = 25 + const val OVERRIDE_NETWORK_NONE = 26 + const val OVERRIDE_NETWORK_LTE_CA = 27 + const val OVERRIDE_NETWORK_LTE_ADVANCED_PRO = 28 + const val OVERRIDE_NETWORK_NR_NSA = 29 + const val OVERRIDE_NETWORK_NR_NSA_MMWAVE = 30 } // Define the class views. @@ -119,6 +145,214 @@ class WebViewDialog : DialogFragment() { // Set the tile. dialogBuilder.setTitle(R.string.contributors) } + + STINGRAY -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.secure_5g_nr_sa) + + // Set the tile. + dialogBuilder.setTitle(R.string.stingrays) + } + + NETWORK_UNKNOWN -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.unknown) + } + + NETWORK_GPRS -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.gprs) + } + + NETWORK_EDGE -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.edge) + } + + NETWORK_UMTS -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.umts) + } + + NETWORK_CDMA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.cdma) + } + + NETWORK_EVDO_0 -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.evdo_0) + } + + NETWORK_EVDO_A -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.evdo_a) + } + + NETWORK_1xRTT -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.rtt) + } + + NETWORK_HSDPA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.hsdpa) + } + + NETWORK_HSUPA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.hsupa) + } + + NETWORK_HSPA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.hspa) + } + + NETWORK_IDEN -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.iden) + } + + NETWORK_EVDO_B -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.evdo_b) + } + + NETWORK_LTE -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.lte) + } + + NETWORK_EHRPD -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.ehrpd) + } + + NETWORK_HSPAP -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.hspap) + } + + NETWORK_GSM -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.gsm) + } + + NETWORK_TD_SCDMA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.td_scdma) + } + + NETWORK_IWLAN -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.iwlan) + } + + NETWORK_NR -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.nr) + } + + OVERRIDE_NETWORK_NONE -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.none) + } + + OVERRIDE_NETWORK_LTE_CA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.lte_ca) + } + + OVERRIDE_NETWORK_LTE_ADVANCED_PRO -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.lte_ca) + } + + OVERRIDE_NETWORK_NR_NSA -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.nr_nsa) + } + + OVERRIDE_NETWORK_NR_NSA_MMWAVE -> { + // Set the icon. + dialogBuilder.setIcon(R.drawable.privacy_policy) + + // Set the title. + dialogBuilder.setTitle(R.string.nr_nsa_mmwave) + } } // Set the view. @@ -179,6 +413,33 @@ class WebViewDialog : DialogFragment() { CHANGELOG -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/changelog.html") LICENSES -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/licenses.html") CONTRIBUTORS -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/contributors.html") + STINGRAY -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/stingrays.html") + NETWORK_UNKNOWN -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_unknown.html") + NETWORK_GPRS -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_gprs.html") + NETWORK_EDGE -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_edge.html") + NETWORK_UMTS -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_umts.html") + NETWORK_CDMA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_cdma.html") + NETWORK_EVDO_0 -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_evdo_0.html") + NETWORK_EVDO_A -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_evdo_a.html") + NETWORK_1xRTT -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_1xrtt.html") + NETWORK_HSDPA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_hsdpa.html") + NETWORK_HSUPA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_hsupa.html") + NETWORK_HSPA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_hspa.html") + NETWORK_IDEN -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_iden.html") + NETWORK_EVDO_B -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_evdo_b.html") + NETWORK_LTE -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_lte.html") + NETWORK_EHRPD -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_ehrpd.html") + NETWORK_HSPAP -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_hspap.html") + NETWORK_GSM -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_gsm.html") + NETWORK_TD_SCDMA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_td_scdma.html") + NETWORK_IWLAN -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_iwlan.html") + NETWORK_NR -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/network_nr.html") + OVERRIDE_NETWORK_NONE -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_none.html") + OVERRIDE_NETWORK_LTE_CA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_lte_ca.html") + OVERRIDE_NETWORK_LTE_ADVANCED_PRO -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + + "/explanations/override_network_lte_advanced_pro.html") + OVERRIDE_NETWORK_NR_NSA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_nr_nsa.html") + OVERRIDE_NETWORK_NR_NSA_MMWAVE -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_nr_nsa_mmwave.html") } // Scroll the WebView if the saved instance state is not null.