X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyCell.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacycell%2Factivities%2FPrivacyCellActivity.kt;h=7d6fd776b7d36726bb069521309de934bcbf1df5;hp=55d7c92e4111d2cc3a58af10497b715093ba3955;hb=dc76c6f07fd9a5718049d160e079842fa60ff406;hpb=2be052aa618f414a18d73f5075b3b3776180bee5 diff --git a/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCellActivity.kt b/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCellActivity.kt index 55d7c92..7d6fd77 100644 --- a/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCellActivity.kt +++ b/app/src/main/java/com/stoutner/privacycell/activities/PrivacyCellActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2021 Soren Stoutner . + * Copyright © 2021-2022 Soren Stoutner . * * This file is part of Privacy Cell . * @@ -17,9 +17,13 @@ * along with Privacy Cell. If not, see . */ +// The suppression of deprecation lint can be removed once the minimum API >= 31. +@file:Suppress("DEPRECATION") + package com.stoutner.privacycell.activities import android.Manifest +import android.annotation.SuppressLint import android.app.ActivityManager import android.content.Context import android.content.Intent @@ -137,6 +141,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem // Define the phone state listener. The `PhoneStateListener` can be replaced by `TelephonyCallback` once the minimum API >= 31. phoneStateListener = object : PhoneStateListener() { + @SuppressLint("SwitchIntDef") override fun onDisplayInfoChanged(telephonyDisplayInfo: TelephonyDisplayInfo) { // Populate the stingray security information. if (telephonyDisplayInfo.networkType == TelephonyManager.NETWORK_TYPE_NR) { // This is a secure 5G NR SA network. @@ -342,6 +347,14 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem startActivity(settingsIntent) } + R.id.protocols -> { + // Create an intent to load the Protocols activity. + val protocolsIntent = Intent(this, ProtocolsActivity::class.java) + + // Make it so. + startActivity(protocolsIntent) + } + R.id.logcat -> { // Logcat. // Create an intent to load the Logcat activity. val logcatIntent = Intent(this, LogcatActivity::class.java)