}
android {
- compileSdk 33
+ compileSdk 34
defaultConfig {
applicationId "com.stoutner.privacycell"
minSdk 30
- targetSdk 33
+ targetSdk 34
versionCode 11
versionName "1.9"
- resConfigs "en", "de", "es", "fr", "it", "ru"
+ resourceConfigurations += ['en', 'de', 'es', 'fr', 'it', 'ru']
+ }
+
+ // Specify the compile Java version. This must match the Kotlin JVM target. For some reason the system was not setting this correctly. These can probably be removed in the future.
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+
+ // Specify the Kotlin JVM target. This must match the compile Java version. For some reason the system was not setting this correctly. These can probably be removed in the future.
+ kotlinOptions {
+ jvmTarget = 17
}
buildTypes {
dependencies {
// Include the following AndroidX libraries.
implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'androidx.core:core-ktx:1.9.0'
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0'
- implementation 'androidx.preference:preference-ktx:1.2.0'
+ implementation 'androidx.core:core-ktx:1.12.0'
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
+ implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
- implementation 'androidx.webkit:webkit:1.6.0'
+ implementation 'androidx.webkit:webkit:1.8.0'
implementation 'androidx.work:work-runtime-ktx:2.8.1'
// Include the Kotlin standard library. This should be the same version number listed in the project build.gradle.
- implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0'
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'
// Include the Google material library.
- implementation 'com.google.android.material:material:1.8.0'
+ implementation 'com.google.android.material:material:1.10.0'
}
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
<!-- Required to run a foreground service (which is the only type of service that can display notifications). -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<!-- Required to start the realtime notification icon at boot. -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
android:screenOrientation="fullUser" />
<!-- Realtime Monitoring Service. -->
- <service android:name=".services.RealtimeMonitoringService" />
+ <service
+ android:name=".services.RealtimeMonitoringService"
+ android:foregroundServiceType="specialUse" >
+
+ <property
+ android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
+ android:value="Displays current cell protocol security information." />
+ </service>
<!-- On Boot Completed Receiver. -->
<receiver
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
Translation 2021 Bernhard G. Keller. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Erlaubt Privacy Cell, ein Benachrichtigungs-Icon für die Echtzeit-Überwachung in der Status-Zeile anzuzeigen.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Ausführung bei Systemstart</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Erlaubt Privacy Cell die Echtzeit-Überwachung zu aktivieren, wenn das Smartphone gebootet wird.</p>
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Allows Privacy Cell to display a realtime monitoring notification icon in the status bar.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Run at startup</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Allows Privacy Cell to enable the realtime monitoring service when the phone boots.</p>
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
Translation 2021 Jose A. León. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Allows Privacy Cell to display a realtime monitoring notification icon in the status bar.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Run at startup</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Allows Privacy Cell to enable the realtime monitoring service when the phone boots.</p>
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
Translation 2021 Kévin L. <kevinliste@framalistes.org>. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Permet à Privacy Cell d'afficher une icône de notification de surveillance en temps réel dans la barre d'état.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Exécution au démarrage</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Permet à Privacy Cell d'activer le service de surveillance en temps réel lorsque le téléphone démarre.</p>
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
Translation 2021 Francesco Buratti. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Allows Privacy Cell to display a realtime monitoring notification icon in the status bar.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Run at startup</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Allows Privacy Cell to enable the realtime monitoring service when the phone boots.</p>
<!--
- Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
<p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_SERVICE</a></p>
<p>Разрешает Privacy Cell отображать значок уведомления о мониторинге в реальном времени в строке состояния.</p>
+ <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_SERVICE_<wbr>SPECIAL_USE</a></p>
+ <p>Specifies the type of foreground service.
+ Special Use is for services that don't fit into any of the <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">standard categories</a>.</p>
+
<h3>Запуск при загрузке</h3>
<p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_BOOT_COMPLETED</a></p>
<p>Разрешает Privacy Cell включать службу мониторинга в реальном времени при загрузке телефона.</p>
/*
- * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
private lateinit var bottomAppBarPreference: Preference
companion object {
- // Declare the private static class variables. Otherwise, onRestart will not pull the same values that are populated from the saved instance state.
+ // Declare the private static class variables. For some reason (I'm looking at you Android's Activity Lifecycle) this only works if these are static.
private var fragmentRestarted: Boolean = false
private var scrollY: Int = 0
}
// Check if the fragment has been restarted.
if (savedInstanceState != null) {
- // Set the fragment restored flag.
+ // Set the fragment restarted flag.
fragmentRestarted = true
// Save the scroll Y.
/*
- * Copyright 2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
}
fun getNetworkTypeStringArray(networkType: Int, context: Context) : Array<String> {
- // Return the string array that corresponds to the network type.
+ // Return the string array that corresponds to the network type. The deprecated `NETWORK_TYPE_IDEN` can be removed once the minimum API >= 34.
+ @Suppress("DEPRECATION")
return when(networkType) {
TelephonyManager.NETWORK_TYPE_UNKNOWN -> arrayOf(context.getString(R.string.unknown), "")
TelephonyManager.NETWORK_TYPE_GPRS -> arrayOf(context.getString(R.string.gprs), context.getString(R.string.gprs_detail))
/*
- * Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021,2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
}
}
}
-}
\ No newline at end of file
+}
/*
- * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
// Return a success.
return Result.success()
}
-}
\ No newline at end of file
+}
/*
- * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
// Return a success.
return Result.success()
}
-}
\ No newline at end of file
+}
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.4.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
+ classpath 'com.android.tools.build:gradle:8.1.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
-task clean(type: Delete) {
+tasks.register('clean', Delete) {
delete rootProject.buildDir
}
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
+
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
+
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
+
# Enable the configuration cache, which improves build speed.
-org.gradle.unsafe.configuration-cache=true
\ No newline at end of file
+org.gradle.unsafe.configuration-cache=true
+
+# Use non-transitive R classes, which speed up the build process when the configuration has not changed.
+android.nonTransitiveRClass=true
+
+# Use non-final resource IDs for faster incremental compilation.
+android.nonFinalResIds=true
+
+android.defaults.buildfeatures.buildconfig=true
\ No newline at end of file
+# Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+#
+# This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
+#
+# Privacy Cell is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Privacy Cell 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 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 <http://www.gnu.org/licenses/>.
+
#Thu Aug 12 09:15:13 MST 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME