X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Ffragments%2FAboutVersionFragment.kt;fp=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Ffragments%2FAboutVersionFragment.kt;h=c2c90f368c5f47d636a88669e6829453b8aaa1e4;hp=b60303c581b335aa64983bc474c4fb1d0f8993b6;hb=2eecbd37661b76d1bcd4020d6218ea6641917527;hpb=b664d689b9757ffd1fd224c85a9659d2f4df1204 diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt index b60303c5..c2c90f36 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt @@ -327,8 +327,7 @@ class AboutVersionFragment : Fragment() { // Get the Orbot version name if Orbot is installed. val orbot: String = try { - // Store the version name. The newer `getPackageInfo()` may be used once the minimum API >= 33. - @Suppress("DEPRECATION") + // Store the version name. requireContext().packageManager.getPackageInfo("org.torproject.android", 0).versionName } catch (exception: PackageManager.NameNotFoundException) { // Orbot is not installed. // Store an empty string. @@ -337,13 +336,11 @@ class AboutVersionFragment : Fragment() { // Get the I2P version name if I2P is installed. val i2p: String = try { - // Check to see if the F-Droid flavor is installed. The newer `getPackageInfo()` may be used once the minimum API >= 33. - @Suppress("DEPRECATION") + // Check to see if the F-Droid flavor is installed. requireContext().getString(R.string.fdroid_flavor, requireContext().packageManager.getPackageInfo("net.i2p.android.router", 0).versionName) } catch (exception: PackageManager.NameNotFoundException) { // The F-Droid flavor is not installed. try { - // Check to see if the F-Droid flavor is installed. The newer `getPackageInfo()` may be used once the minimum API >= 33. - @Suppress("DEPRECATION") + // Check to see if the F-Droid flavor is installed. requireContext().getString(R.string.google_play_flavor, requireContext().packageManager.getPackageInfo("net.i2p.android", 0).versionName) } catch (exception: PackageManager.NameNotFoundException) { // The Google Play flavor is not installed either. // Store an empty string. @@ -353,8 +350,7 @@ class AboutVersionFragment : Fragment() { // Get the OpenKeychain version name if it is installed. val openKeychain: String = try { - // Store the version name. The newer `getPackageInfo()` may be used once the minimum API >= 33. - @Suppress("DEPRECATION") + // Store the version name. requireContext().packageManager.getPackageInfo("org.sufficientlysecure.keychain", 0).versionName } catch (exception: PackageManager.NameNotFoundException) { // OpenKeychain is not installed. // Store an empty string.