From: Soren Stoutner Date: Sat, 14 Mar 2026 21:18:43 +0000 (-0700) Subject: Fix a crash when there is no default Voice SIM. https://redmine.stoutner.com/issues... X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=HEAD;p=PrivacyCell.git Fix a crash when there is no default Voice SIM. https://redmine.stoutner.com/issues/1298 --- diff --git a/app/build.gradle b/app/build.gradle index 20acc32..010af9f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2021-2025 Soren Stoutner + * SPDX-FileCopyrightText: 2021-2026 Soren Stoutner * * This file is part of Privacy Cell . * @@ -19,7 +19,6 @@ plugins { id 'com.android.application' - id 'kotlin-android' } android { @@ -64,15 +63,15 @@ android { dependencies { // Include the following AndroidX libraries. implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.core:core-ktx:1.17.0' + implementation 'androidx.core:core-ktx:1.18.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0' implementation 'androidx.preference:preference-ktx:1.2.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0' implementation 'androidx.webkit:webkit:1.15.0' - implementation 'androidx.work:work-runtime-ktx:2.11.0' + implementation 'androidx.work:work-runtime-ktx:2.11.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:2.2.0' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.10' // Include the Google material library. implementation 'com.google.android.material:material:1.13.0' diff --git a/app/src/main/assets/de/changelog.html b/app/src/main/assets/de/changelog.html index 0a5cfa7..0ef18c5 100644 --- a/app/src/main/assets/de/changelog.html +++ b/app/src/main/assets/de/changelog.html @@ -33,7 +33,7 @@

1.12 (Code-Version 14)

-

22. Dezember 2025 - Mindest-API 30, Ziel-API 36

+

22. Dezember 2025 - Mindest-API 30, Ziel-API 36

  • Ziel-API auf 36 (Android 16) angehoben. Dies bringt u.A. ein großes Icon für erweiterte Benachrichtigungen mit sich.
  • Farbe des zusätzlichen Netzwerk-Info-Texts entspricht jetzt immer jener des Netzwerk-Info-Texts.
  • diff --git a/app/src/main/assets/en/changelog.html b/app/src/main/assets/en/changelog.html index 8aa7268..5a50e37 100644 --- a/app/src/main/assets/en/changelog.html +++ b/app/src/main/assets/en/changelog.html @@ -31,7 +31,7 @@

    1.12 (version code 14)

    -

    22 December 2025 - minimum API 30, target API 36

    +

    22 December 2025 - minimum API 30, target API 36

    • Bump the target API to 36 (Android 16), adding a large icon to the expanded notifications.
    • Make the additional network info text color always match the data network text color.
    • diff --git a/app/src/main/assets/es/changelog.html b/app/src/main/assets/es/changelog.html index d3f4aa2..dd059c9 100644 --- a/app/src/main/assets/es/changelog.html +++ b/app/src/main/assets/es/changelog.html @@ -33,7 +33,7 @@

      1.12 (versión del código 14)

      -

      22 de diciembre de 2025 - API mínimo 30, API objetivo 36

      +

      22 de diciembre de 2025 - API mínimo 30, API objetivo 36

      • Aumentar la API objetivo a 36 (Android 16), y añadir un icono grande a las notificaciones expandidas.
      • Hacer que el color del texto de la información adicional de la red coincida siempre con el color del texto de la red de datos.
      • diff --git a/app/src/main/assets/fr/changelog.html b/app/src/main/assets/fr/changelog.html index 9ca1d69..88c24a2 100644 --- a/app/src/main/assets/fr/changelog.html +++ b/app/src/main/assets/fr/changelog.html @@ -33,7 +33,7 @@

        1.12 (version du code 14)

        -

        22 Décembre 2025 - API minimale : 30, API optimale : 36

        +

        22 Décembre 2025 - API minimale : 30, API optimale : 36

        • Bump the target API to 36 (Android 16), adding a large icon to the expanded notifications.
        • Make the additional network info text color always match the data network text color.
        • diff --git a/app/src/main/assets/it/changelog.html b/app/src/main/assets/it/changelog.html index eacd2a6..c5cefa2 100644 --- a/app/src/main/assets/it/changelog.html +++ b/app/src/main/assets/it/changelog.html @@ -33,7 +33,7 @@

          1.12 (versione codice 14)

          -

          22 Dicembre 2025 - minima API 30, target API 36

          +

          22 Dicembre 2025 - minima API 30, target API 36

          • Spostamento della target API a 36 (Android 16), aggiungendo una icona grande nelle notifiche espanse.
          • Modifica per far sì che il colore del testo delle info aggiuntive sulla rete sia sempre uguale al colore del testo della rete dati.
          • diff --git a/app/src/main/assets/ru/changelog.html b/app/src/main/assets/ru/changelog.html index 68c401b..53d089e 100644 --- a/app/src/main/assets/ru/changelog.html +++ b/app/src/main/assets/ru/changelog.html @@ -31,7 +31,7 @@

            1.12 (код версии 14)

            -

            22 декабря 2025 года - минимальный API 30, целевой API 36

            +

            22 декабря 2025 года - минимальный API 30, целевой API 36

            • Целевой API повышен до 36 (Android 16), в расширенные уведомления добавлена большая иконка.
            • Предусмотрена возможность настройки цвета текста дополнительной информации о сети в советском с цветом текста о сети передачи данных.
            • 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 634e57c..bdaec24 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 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2021-2022, 2025 Soren Stoutner + * SPDX-FileCopyrightText: 2021-2022, 2025-2026 Soren Stoutner * * This file is part of Privacy Cell . * @@ -186,8 +186,9 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem // Create the voice subscription info string. var voiceSubscriptionInfoString = "" - // Populate the voice carrier info string if the appropriate permission has been granted. - if (ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.READ_PHONE_NUMBERS) == PackageManager.PERMISSION_GRANTED) { + // Populate the voice carrier info string if the subscription ID is valid and the appropriate permission has been granted. + if ((voiceSubscriptionId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) && + (ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.READ_PHONE_NUMBERS) == PackageManager.PERMISSION_GRANTED)) { // Populate the voice carrier info string. The deprecated command must be used until the API >= 33. voiceSubscriptionInfoString = if (Build.VERSION.SDK_INT <= 32) "${subscriptionManager.getActiveSubscriptionInfo(voiceSubscriptionId).carrierName} – ${subscriptionManager.getActiveSubscriptionInfo(voiceSubscriptionId).number}" @@ -269,7 +270,8 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem var dataSubscriptionInfoString = "" // Populate the data carrier info string if the appropriate permission has been granted. - if (ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.READ_PHONE_NUMBERS) == PackageManager.PERMISSION_GRANTED) { + if ((dataSubscriptionId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) && + (ActivityCompat.checkSelfPermission(applicationContext, Manifest.permission.READ_PHONE_NUMBERS) == PackageManager.PERMISSION_GRANTED)) { // Populate the data carrier info string. The deprecated command must be used until the API >= 33. dataSubscriptionInfoString = if (Build.VERSION.SDK_INT <= 32) "${subscriptionManager.getActiveSubscriptionInfo(dataSubscriptionId).carrierName} – ${subscriptionManager.getActiveSubscriptionInfo(dataSubscriptionId).number}" diff --git a/app/src/main/java/com/stoutner/privacycell/services/RealtimeMonitoringService.kt b/app/src/main/java/com/stoutner/privacycell/services/RealtimeMonitoringService.kt index c989e3c..f945b0f 100644 --- a/app/src/main/java/com/stoutner/privacycell/services/RealtimeMonitoringService.kt +++ b/app/src/main/java/com/stoutner/privacycell/services/RealtimeMonitoringService.kt @@ -145,6 +145,9 @@ class RealtimeMonitoringService : Service() { // Set the notification icon. notificationBuilder.setSmallIcon(R.drawable.antiquated_notification_enabled) + // Set the large icon. + notificationBuilder.setLargeIcon(Icon.createWithResource(this, R.drawable.antiquated)) + // Set the color. notificationBuilder.setColor(getColor(R.color.red_notification_icon)) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index a1e31f1..30c3091 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -139,8 +139,7 @@ Benachrichtigung über unsicheres Netzwerk Benachrichtigung über veraltetes Netzwerk 3G als veraltet ansehen - 3G-Protokolle als veraltet ansehen. Zu einem späteren Zeitpunkt wird dies zur Standard-Einstellung werden. - Das Ändern dieser Einstellung startet Privacy Cell neu. + 3G-Protokolle als veraltet ansehen. Das Ändern dieser Einstellung startet Privacy Cell neu. Anschluss Anwendungs-Leiste unten Zeigt die Anwendungs-Leiste am unteren Bildschirmrand an. Nach Ändern dieser Einstellung wird Privacy Cell neu gestartet. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e99105c..9aa1764 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -139,8 +139,7 @@ Notificación de red insegura Notificación de red obsoleta Considera obsoleto 3G - Considera los protocolos 3G como obsoletos. En un futuro esto se convertirá en el valor por defecto. - Al cambiar esta configuración se reiniciará Privacy Cell. + Considera los protocolos 3G como obsoletos. Al cambiar esta configuración se reiniciará Privacy Cell. Interfaz Barra inferior de app Mueve la barra de aplicaciones a la parte inferior de la pantalla. Al cambiar esta configuración se reiniciará Privacy Cell. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 0bf82cc..6751fc5 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -140,7 +140,7 @@ Notification de réseau non sécurisé Notification de réseau obsolète Considérer la 3G comme obsolète - Considérez les protocoles 3G comme désuets. A l\'avenir, cela deviendra la valeur par défaut. Changer ce paramètre redémarrera Privacy Cell. + Considérez les protocoles 3G comme désuets. Changer ce paramètre redémarrera Privacy Cell. Interface Barre d\'apps inférieure Déplacer la barre d\'apps en bas de l\'écran. Changer ce paramètre redémarrera Privacy Cell. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 76f0af4..11deb9a 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -139,8 +139,7 @@ Notifica di rete insicura Notifiche di Rete Antiquata Considera il 3G come antiquato - Considera il protocollo 3G come antiquato. Ad un certo punto in futuro questa impostazione sarà quella di default. - La modifica di questa impostazione provocherà il riavvio di Privacy Cell. + Considera il protocollo 3G come antiquato. La modifica di questa impostazione provocherà il riavvio di Privacy Cell. Interfaccia Barra dell\'app in basso Sposta la barra dell\'app nella parte inferiore dello schermo. La modifica di questa impostazione provoca il riavvio di Privacy Cell. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 373734b..ff61a41 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -137,7 +137,7 @@ Уведомление о небезопасной сети Оповещение об устаревшей сети Считать 3G устаревшей - Считать протоколы 3G устаревшими. В будущем это станет установкой по умолчанию. Изменение этой настройки приведет к перезапуску Privacy Cell. + Считать протоколы 3G устаревшими. Изменение этой настройки приведет к перезапуску Privacy Cell. Интерфейс Панель приложения внизу Переместить панель приложения в нижнюю часть экрана. Изменение этой настройки приведет к перезапуску Privacy Cell. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 28bf741..bddab5f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -141,7 +141,7 @@ Insecure network notification Antiquated network notification Consider 3G antiquated - Consider the 3G protocols to be antiquated. At a future point this will become the default. Changing this setting will restart Privacy Cell. + Consider the 3G protocols to be antiquated. Changing this setting will restart Privacy Cell. Interface Bottom app bar Move the app bar to the bottom of the screen. Changing this setting will restart Privacy Cell. diff --git a/build.gradle b/build.gradle index d5a62b2..873e2ab 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2021-2025 Soren Stoutner + * SPDX-FileCopyrightText: 2021-2026 Soren Stoutner * * This file is part of Privacy Cell . * @@ -25,8 +25,8 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.13.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.0" + classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.10' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 558489c..25f0555 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2023, 2025 Soren Stoutner +# SPDX-FileCopyrightText: 2023, 2025-2026 Soren Stoutner # # This file is part of Privacy Cell . # @@ -17,7 +17,7 @@ # this program. If not, see . distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME