]> gitweb.stoutner.com Git - PrivacyCell.git/commitdiff
Indicate which SIM cards are in use. https://redmine.stoutner.com/issues/1117 master
authorSoren Stoutner <soren@stoutner.com>
Wed, 23 Apr 2025 23:31:36 +0000 (16:31 -0700)
committerSoren Stoutner <soren@stoutner.com>
Wed, 23 Apr 2025 23:31:36 +0000 (16:31 -0700)
17 files changed:
app/build.gradle
app/src/main/AndroidManifest.xml
app/src/main/assets/de/permissions.html
app/src/main/assets/en/permissions.html
app/src/main/assets/es/permissions.html
app/src/main/assets/fr/permissions.html
app/src/main/assets/it/permissions.html
app/src/main/assets/ru/permissions.html
app/src/main/java/com/stoutner/privacycell/activities/PrivacyCellActivity.kt
app/src/main/java/com/stoutner/privacycell/activities/ProtocolsActivity.kt
app/src/main/java/com/stoutner/privacycell/dialogs/NotificationPermissionDialog.kt
app/src/main/java/com/stoutner/privacycell/dialogs/PhonePermissionDialog.kt
app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt
app/src/main/res/layout/privacy_cell_bottom_appbar.xml
app/src/main/res/layout/privacy_cell_top_appbar.xml
app/src/main/res/values/strings.xml
build.gradle

index cda9f4f131a091be27f39ab6ed422e689aede796..3fcd6ef62a0110663a57697f97d27f853dfb9ed5 100644 (file)
@@ -64,12 +64,12 @@ android {
 dependencies {
     // Include the following AndroidX libraries.
     implementation 'androidx.appcompat:appcompat:1.7.0'
 dependencies {
     // Include the following AndroidX libraries.
     implementation 'androidx.appcompat:appcompat:1.7.0'
-    implementation 'androidx.core:core-ktx:1.15.0'
+    implementation 'androidx.core:core-ktx:1.16.0'
     implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7'
     implementation 'androidx.preference:preference-ktx:1.2.1'
     implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
     implementation 'androidx.webkit:webkit:1.13.0'
     implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7'
     implementation 'androidx.preference:preference-ktx:1.2.1'
     implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
     implementation 'androidx.webkit:webkit:1.13.0'
-    implementation 'androidx.work:work-runtime-ktx:2.10.0'
+    implementation 'androidx.work:work-runtime-ktx:2.10.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.1.0'
 
     // 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.1.0'
index 7a0c5ca1a2d4b6b981468101c3e1bcda604786fe..dbdc5dc662706d9f279990a5e70135610487e798 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright 2021-2023 Soren Stoutner <soren@stoutner.com>.
+  Copyright 2021-2023, 2025 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
 
 
   This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
 
@@ -27,6 +27,9 @@
     <!-- Required to read cell network information.  <Dangerous permission> -->
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
 
     <!-- Required to read cell network information.  <Dangerous permission> -->
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
 
+    <!-- Required to read sim card phone numbers.  <Dangerous permission> -->
+    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
+
     <!-- Required to display a notification.  <Dangerous permission> -->
     <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
 
     <!-- Required to display a notification.  <Dangerous permission> -->
     <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
 
@@ -61,7 +64,8 @@
             android:label="@string/cell"
             android:launchMode="singleTask"
             android:screenOrientation="fullUser"
             android:label="@string/cell"
             android:launchMode="singleTask"
             android:screenOrientation="fullUser"
-            android:exported="true" >
+            android:exported="true"
+            tools:ignore="DiscouragedApi" >
 
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
             android:name=".activities.SettingsActivity"
             android:label="@string/settings"
             android:parentActivityName=".activities.PrivacyCellActivity"
             android:name=".activities.SettingsActivity"
             android:label="@string/settings"
             android:parentActivityName=".activities.PrivacyCellActivity"
-            android:screenOrientation="fullUser" />
+            android:screenOrientation="fullUser"
+            tools:ignore="DiscouragedApi" />
 
         <!-- Protocols Activity.  The `parentActivityName` is used when navigating back. -->
         <activity
             android:name=".activities.ProtocolsActivity"
             android:label="@string/protocols"
             android:parentActivityName=".activities.PrivacyCellActivity"
 
         <!-- Protocols Activity.  The `parentActivityName` is used when navigating back. -->
         <activity
             android:name=".activities.ProtocolsActivity"
             android:label="@string/protocols"
             android:parentActivityName=".activities.PrivacyCellActivity"
-            android:screenOrientation="fullUser" />
+            android:screenOrientation="fullUser"
+            tools:ignore="DiscouragedApi" />
 
         <!-- Logcat Activity. The `parentActivityName` is used when navigating back. -->
         <activity
             android:name=".activities.LogcatActivity"
             android:label="@string/logcat"
             android:parentActivityName=".activities.PrivacyCellActivity"
 
         <!-- Logcat Activity. The `parentActivityName` is used when navigating back. -->
         <activity
             android:name=".activities.LogcatActivity"
             android:label="@string/logcat"
             android:parentActivityName=".activities.PrivacyCellActivity"
-            android:screenOrientation="fullUser" />
+            android:screenOrientation="fullUser"
+            tools:ignore="DiscouragedApi" />
 
         <!-- Realtime Monitoring Service. -->
         <service
 
         <!-- Realtime Monitoring Service. -->
         <service
index a32a9266a4f3c8de95ef19e40c069072dd657b2f..78cc072f08ba25f39b8fb6ebc26e383aaf05cdb6 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Benötigt, um die vom Mobilfunk-Netzwerk genutzten Protokolle zu ermitteln.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Benötigt, um die vom Mobilfunk-Netzwerk genutzten Protokolle zu ermitteln.</p>
 
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
         <h3>Zeige Benachrichtigungen</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Erlaubt Privacy Cell, ein Benachrichtigungs-Icon für die Echtzeit-Überwachung in der Status-Zeile anzuzeigen.</p>
         <h3>Zeige Benachrichtigungen</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Erlaubt Privacy Cell, ein Benachrichtigungs-Icon für die Echtzeit-Überwachung in der Status-Zeile anzuzeigen.</p>
@@ -55,7 +59,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Erlaubt Privacy Cell die Echtzeit-Überwachung zu aktivieren, wenn das Smartphone gebootet wird.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Erlaubt Privacy Cell die Echtzeit-Überwachung zu aktivieren, wenn das Smartphone gebootet wird.</p>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Automatisch hinzugefügt für alle Apps mit API >= 33 (Android 13), um zu verhindern, dass sich andere Apps ohne expliziter Erlaubnis mit dynamischen BroadcastReceivern verbinden.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Automatisch hinzugefügt für alle Apps mit API >= 33 (Android >= 13), um zu verhindern, dass sich andere Apps ohne expliziter Erlaubnis mit dynamischen BroadcastReceivern verbinden.</p>
     </body>
 </html>
\ No newline at end of file
     </body>
 </html>
\ No newline at end of file
index 53a6548b482300dc61c9752dbb7a9d7f76d252a0..5a07babad01c90c873d32fba155c8868977ef8af 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Required to determine which protocols are being used by the cell phone network.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Required to determine which protocols are being used by the cell phone network.</p>
 
-        <h3>Show Notifications</h3>
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
+        <h3>Show notifications</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</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.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Allows Privacy Cell to display a realtime monitoring notification icon in the status bar.</p>
 
@@ -44,6 +48,7 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Allows Privacy Cell to update the realtime monitoring notification icon when the app is not in the foreground.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Allows Privacy Cell to update the realtime monitoring notification icon when the app is not in the foreground.</p>
 
+        <h3>Foreground service special use</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>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>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>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>
@@ -52,7 +57,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Allows Privacy Cell to enable the realtime monitoring service when the phone boots.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Allows Privacy Cell to enable the realtime monitoring service when the phone boots.</p>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Automatically added to all apps targeting API >= 33 (Android 13) to prevent other apps from connecting to dynamic receivers without explicit permission.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Automatically added to all apps targeting API >= 33 (Android >= 13) to prevent other apps from connecting to dynamic receivers without explicit permission.</p>
     </body>
 </html>
     </body>
 </html>
index 85fe57971aee1ef35120f6a2d2c23d223048533e..21fb1bd7242aa8d999dce964ab09c7d7b6b28d64 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Requerido para determinar qué protocolos se están usando por la red del teléfono celular.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Requerido para determinar qué protocolos se están usando por la red del teléfono celular.</p>
 
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
         <h3>Mostrar notificaciones</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Permite a Privacy Cell mostrar un icono de notificación de supervisión en tiempo real en la barrra de estado.</p>
         <h3>Mostrar notificaciones</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Permite a Privacy Cell mostrar un icono de notificación de supervisión en tiempo real en la barrra de estado.</p>
@@ -46,6 +50,7 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permite a Privacy Cell actualizar el icono de notificación de supervisión cuando la aplicación no está en primer plano.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permite a Privacy Cell actualizar el icono de notificación de supervisión cuando la aplicación no está en primer plano.</p>
 
+        <h3>Foreground service special use</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Especifica el tipo de servicio en primer plano.
             El uso especial es para servicios que no encajan en ninguna de las <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">categorías estándar</a>.</p>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Especifica el tipo de servicio en primer plano.
             El uso especial es para servicios que no encajan en ninguna de las <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">categorías estándar</a>.</p>
@@ -54,7 +59,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Permite a Privacy Cell activar el servicio de monitorización en tiempo real al arrancar el teléfono.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Permite a Privacy Cell activar el servicio de monitorización en tiempo real al arrancar el teléfono.</p>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Se añade automáticamente a todas las aplicaciones con API >= 33 (Android 13) para impedir que otras aplicaciones se conecten a receptores dinámicos sin permiso explícito.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Se añade automáticamente a todas las aplicaciones con API >= 33 (Android >= 13) para impedir que otras aplicaciones se conecten a receptores dinámicos sin permiso explícito.</p>
     </body>
 </html>
     </body>
 </html>
index 7b1d76270b96e6539710ceb8bbaa423a55eb9d62..b3151aa78bc45547a50222c97911451cddfd9999 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Nécessaire pour déterminer quels protocoles sont utilisés par le réseau de téléphonie mobile.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Nécessaire pour déterminer quels protocoles sont utilisés par le réseau de téléphonie mobile.</p>
 
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
         <h3>Afficher les Notifications</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</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>
         <h3>Afficher les Notifications</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</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>
@@ -46,6 +50,7 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permet à Privacy Cell de mettre à jour l'icône de notification de surveillance en temps réel lorsque l'application n'est pas au premier plan.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permet à Privacy Cell de mettre à jour l'icône de notification de surveillance en temps réel lorsque l'application n'est pas au premier plan.</p>
 
+        <h3>Foreground service special use</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Spécifie le type de service de premier plan.
             L'utilisation spécifique concerne les services qui n'entrent dans <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">aucune des catégories standard</a>.</p>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Spécifie le type de service de premier plan.
             L'utilisation spécifique concerne les services qui n'entrent dans <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">aucune des catégories standard</a>.</p>
@@ -54,7 +59,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>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>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>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>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Ajout automatique à toutes les applications ciblant l'API >= 33 (Android 13) pour empêcher les autres applications de se connecter aux destinataires dynamiques sans autorisation explicite.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Ajout automatique à toutes les applications ciblant l'API >= 33 (Android >= 13) pour empêcher les autres applications de se connecter aux destinataires dynamiques sans autorisation explicite.</p>
     </body>
 </html>
     </body>
 </html>
index 1c2649900f37ee7c60a91dd6c574ea84d60df623..ff70a258bc54e888659b947fd140510eac437f0c 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Richiesta per determinare i protocolli utilizzati dalla rete.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Richiesta per determinare i protocolli utilizzati dalla rete.</p>
 
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
         <h3>Mostra notifiche</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Permette a Privacy Cell di mostrare una icona di notifica di monitoraggio in tempo reale nella barra di stato.</p>
         <h3>Mostra notifiche</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Permette a Privacy Cell di mostrare una icona di notifica di monitoraggio in tempo reale nella barra di stato.</p>
@@ -46,6 +50,7 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permette a Privacy Cell di aggiornare licona di notifica di monitoraggio in tempo reale anche quando la app non è in primo piano.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Permette a Privacy Cell di aggiornare licona di notifica di monitoraggio in tempo reale anche quando la app non è in primo piano.</p>
 
+        <h3>Foreground service special use</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Specifica il tipo di servizio in primo piano.
             L'utilizzo speciale è per i servizi che non ricadono in nessuna delle <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">categorie standard</a>.</p>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Specifica il tipo di servizio in primo piano.
             L'utilizzo speciale è per i servizi che non ricadono in nessuna delle <a href="https://developer.android.com/about/versions/14/changes/fgs-types-required">categorie standard</a>.</p>
@@ -54,7 +59,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Permette a Privacy Cell di abilitare il servizio di monitoraggio in tempo reale durante l'avvio del dispositivo.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Permette a Privacy Cell di abilitare il servizio di monitoraggio in tempo reale durante l'avvio del dispositivo.</p>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Aggiunta automaticamente a tutte le App che hanno come target API >= 33 (Android 13) per impedire ad altre App di connettersi ai ricevitori dinamici senza una autorizzazione esplicita.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Aggiunta automaticamente a tutte le App che hanno come target API >= 33 (Android >= 13) per impedire ad altre App di connettersi ai ricevitori dinamici senza una autorizzazione esplicita.</p>
     </body>
 </html>
     </body>
 </html>
index 4817965490faec58375f45c2b71509e7ac975d22..561ed412a86dd2bce2831d8423ad8233ab5b5cd5 100644 (file)
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Необходим для определения используемых протоколов в сети сотовой связи.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE">android.permission.<wbr>READ_<wbr>PHONE_<wbr>STATE</a></p>
         <p>Необходим для определения используемых протоколов в сети сотовой связи.</p>
 
+        <h3>Read phone numbers</h3>
+        <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS">android.permission.<wbr>READ_<wbr>PHONE_<wbr>NUMBERS</a></p>
+        <p>Required to display the cell network name and phone number of the SIM card.</p>
+
         <h3>Отображение уведомлений</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Разрешает Privacy Cell отображать значок уведомления о мониторинге в реальном времени в строке состояния.</p>
         <h3>Отображение уведомлений</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission.html#POST_NOTIFICATIONS">android.permission.<wbr>POST_<wbr>NOTIFICATIONS</a></p>
         <p>Разрешает Privacy Cell отображать значок уведомления о мониторинге в реальном времени в строке состояния.</p>
@@ -44,6 +48,7 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Разрешает Privacy Cell обновлять значок уведомления о мониторинге в реальном времени при работе приложения в фоновом режиме.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE</a></p>
         <p>Разрешает Privacy Cell обновлять значок уведомления о мониторинге в реальном времени при работе приложения в фоновом режиме.</p>
 
+        <h3>Foreground service special use</h3>
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Определяет тип сервиса фонового режима.
             Специальное использование предназначено для сервисов, которые не соответствуют ни одной из
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_SPECIAL_USE">android.permission.<wbr>FOREGROUND_<wbr>SERVICE_<wbr>SPECIAL_<wbr>USE</a></p>
         <p>Определяет тип сервиса фонового режима.
             Специальное использование предназначено для сервисов, которые не соответствуют ни одной из
@@ -53,7 +58,8 @@
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Разрешает Privacy Cell включать службу мониторинга в реальном времени при загрузке телефона.</p>
 
         <p><a href="https://developer.android.com/reference/android/Manifest.permission#RECEIVE_BOOT_COMPLETED">android.permission.<wbr>RECEIVE_<wbr>BOOT_<wbr>COMPLETED</a></p>
         <p>Разрешает Privacy Cell включать службу мониторинга в реальном времени при загрузке телефона.</p>
 
-        <h3><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></h3>
-        <p>Автоматически добавляется во все приложения, использующие API >= 33 (Android 13) для предотвращения подключения других приложений к динамическим приемникам без явного разрешения.</p>
+        <h3>Dynamic receiver not exported</h3>
+        <p><a href="https://developer.android.com/about/versions/13/features#runtime-receivers">com.stoutner.privacycell.<wbr>DYNAMIC_<wbr>RECEIVER_<wbr>NOT_<wbr>EXPORTED_<wbr>PERMISSION</a></p>
+        <p>Автоматически добавляется во все приложения, использующие API >= 33 (Android >= 13) для предотвращения подключения других приложений к динамическим приемникам без явного разрешения.</p>
     </body>
 </html>
     </body>
 </html>
index f450d861c8a8a0a907d0886902134ddb354e179c..3b89b88b4377b72963e6e8d0af7331ebe5f85446 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-3.0-or-later
 /* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2021-2022 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2021-2022, 2025 Soren Stoutner <soren@stoutner.com>
  *
  * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell/>.
  *
  *
  * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell/>.
  *
@@ -28,9 +28,11 @@ import android.app.ActivityManager
 import android.content.Context
 import android.content.Intent
 import android.content.pm.PackageManager
 import android.content.Context
 import android.content.Intent
 import android.content.pm.PackageManager
+import android.os.Build
 import android.os.Bundle
 import android.telephony.PhoneStateListener  // This can be replaced by `TelephonyCallback` once the minimum API >= 31.
 import android.telephony.ServiceState
 import android.os.Bundle
 import android.telephony.PhoneStateListener  // This can be replaced by `TelephonyCallback` once the minimum API >= 31.
 import android.telephony.ServiceState
+import android.telephony.SubscriptionManager
 import android.telephony.TelephonyDisplayInfo
 import android.telephony.TelephonyManager
 import android.view.MenuItem
 import android.telephony.TelephonyDisplayInfo
 import android.telephony.TelephonyManager
 import android.view.MenuItem
@@ -44,6 +46,7 @@ import androidx.appcompat.app.ActionBarDrawerToggle
 import androidx.appcompat.app.AppCompatActivity
 import androidx.appcompat.content.res.AppCompatResources
 import androidx.appcompat.widget.Toolbar
 import androidx.appcompat.app.AppCompatActivity
 import androidx.appcompat.content.res.AppCompatResources
 import androidx.appcompat.widget.Toolbar
+import androidx.cardview.widget.CardView
 import androidx.core.app.ActivityCompat
 import androidx.core.net.toUri
 import androidx.core.view.GravityCompat
 import androidx.core.app.ActivityCompat
 import androidx.core.net.toUri
 import androidx.core.view.GravityCompat
@@ -70,7 +73,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
     // Declare the class views.
     private lateinit var actionBarDrawerToggle: ActionBarDrawerToggle
     private lateinit var drawerLayout: DrawerLayout
     // Declare the class views.
     private lateinit var actionBarDrawerToggle: ActionBarDrawerToggle
     private lateinit var drawerLayout: DrawerLayout
-    private lateinit var overallStatusLinearLayout: LinearLayout
+    private lateinit var overallStatusCardView: CardView
     private lateinit var overallStatusImageView: ImageView
     private lateinit var overallStatusTextView: TextView
 
     private lateinit var overallStatusImageView: ImageView
     private lateinit var overallStatusTextView: TextView
 
@@ -102,15 +105,17 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
         // Get handles for the views.
         drawerLayout = findViewById(R.id.drawerlayout)
         val toolbar = findViewById<Toolbar>(R.id.toolbar)
         // Get handles for the views.
         drawerLayout = findViewById(R.id.drawerlayout)
         val toolbar = findViewById<Toolbar>(R.id.toolbar)
-        overallStatusLinearLayout = findViewById(R.id.overall_status_linearlayout)
+        overallStatusCardView = findViewById(R.id.overall_status_cardview)
         overallStatusImageView = findViewById(R.id.overall_status_imageview)
         overallStatusTextView = findViewById(R.id.overall_status_textview)
         overallStatusImageView = findViewById(R.id.overall_status_imageview)
         overallStatusTextView = findViewById(R.id.overall_status_textview)
-        val voiceNetworkLinearLayout = findViewById<LinearLayout>(R.id.voice_network_linearlayout)
+        val voiceNetworkCardView = findViewById<CardView>(R.id.voice_network_cardview)
         val voiceNetworkTextView = findViewById<TextView>(R.id.voice_network)
         val voiceNetworkDetailsTextView = findViewById<TextView>(R.id.voice_network_details)
         val voiceNetworkTextView = findViewById<TextView>(R.id.voice_network)
         val voiceNetworkDetailsTextView = findViewById<TextView>(R.id.voice_network_details)
+        val voiceNetworkSubscriptionInfoTextView = findViewById<TextView>(R.id.voice_network_subscription_info)
         val dataNetworkLinearLayout = findViewById<LinearLayout>(R.id.data_network_linearlayout)
         val dataNetworkTextView = findViewById<TextView>(R.id.data_network)
         val dataNetworkDetailsTextView = findViewById<TextView>(R.id.data_network_details)
         val dataNetworkLinearLayout = findViewById<LinearLayout>(R.id.data_network_linearlayout)
         val dataNetworkTextView = findViewById<TextView>(R.id.data_network)
         val dataNetworkDetailsTextView = findViewById<TextView>(R.id.data_network_details)
+        val dataNetworkSubscriptionInfoTextView = findViewById<TextView>(R.id.data_network_subscription_info)
         val additionalNetworkInfoLinearLayout = findViewById<LinearLayout>(R.id.additional_network_info_linearlayout)
         val additionalNetworkInfoTextView = findViewById<TextView>(R.id.additional_network_info)
         val additionalNetworkInfoDetailsTextView = findViewById<TextView>(R.id.additional_network_info_details)
         val additionalNetworkInfoLinearLayout = findViewById<LinearLayout>(R.id.additional_network_info_linearlayout)
         val additionalNetworkInfoTextView = findViewById<TextView>(R.id.additional_network_info)
         val additionalNetworkInfoDetailsTextView = findViewById<TextView>(R.id.additional_network_info_details)
@@ -157,6 +162,9 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
         // Instantiate the protocol helper.
         val protocolHelper = ProtocolHelper()
 
         // Instantiate the protocol helper.
         val protocolHelper = ProtocolHelper()
 
+        // Get a handle for the subscription manager.
+        val subscriptionManager = getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE) as SubscriptionManager
+
         // Define the phone state listener.  The `PhoneStateListener` can be replaced by `TelephonyCallback` once the minimum API >= 31.
         phoneStateListener = object : PhoneStateListener() {
             @Deprecated("Deprecated in Java")
         // Define the phone state listener.  The `PhoneStateListener` can be replaced by `TelephonyCallback` once the minimum API >= 31.
         phoneStateListener = object : PhoneStateListener() {
             @Deprecated("Deprecated in Java")
@@ -173,9 +181,31 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                 // Get the voice network type.
                 val voiceNetworkStringArray = protocolHelper.getNetworkTypeStringArray(voiceNetworkTypeInt, applicationContext)
 
                 // Get the voice network type.
                 val voiceNetworkStringArray = protocolHelper.getNetworkTypeStringArray(voiceNetworkTypeInt, applicationContext)
 
+                // Get the default voice subscription id.
+                val voiceSubscriptionId = SubscriptionManager.getDefaultVoiceSubscriptionId()
+
+                // 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.  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}"
+                    else
+                        "${subscriptionManager.getActiveSubscriptionInfo(voiceSubscriptionId).carrierName} – ${subscriptionManager.getPhoneNumber(voiceSubscriptionId)}"
+                }
+
                 // Populate the voice network text views.
                 voiceNetworkTextView.text = getString(R.string.voice_network, voiceNetworkStringArray[0])
                 voiceNetworkDetailsTextView.text = voiceNetworkStringArray[1]
                 // Populate the voice network text views.
                 voiceNetworkTextView.text = getString(R.string.voice_network, voiceNetworkStringArray[0])
                 voiceNetworkDetailsTextView.text = voiceNetworkStringArray[1]
+                voiceNetworkSubscriptionInfoTextView.text = voiceSubscriptionInfoString
+
+                // Hide the voice network details text view if it is empty, which happens with Wi-Fi calling.
+                if (voiceNetworkDetailsTextView.text.isNullOrBlank())
+                    voiceNetworkDetailsTextView.visibility = View.GONE
+                else
+                    voiceNetworkDetailsTextView.visibility = View.VISIBLE
 
                 // Set the color of the voice network.
                 when (voiceNetworkSecurityStatus) {
 
                 // Set the color of the voice network.
                 when (voiceNetworkSecurityStatus) {
@@ -185,7 +215,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                 }
 
                 // Set the voice network click listener.
                 }
 
                 // Set the voice network click listener.
-                voiceNetworkLinearLayout.setOnClickListener {
+                voiceNetworkCardView.setOnClickListener {
                     // Instantiate the voice network dialog fragment according to the network type.
                     val voiceNetworkDialogFragment = when (voiceNetworkTypeInt) {
                         TelephonyManager.NETWORK_TYPE_UNKNOWN -> WebViewDialog().type(WebViewDialog.NETWORK_UNKNOWN)
                     // Instantiate the voice network dialog fragment according to the network type.
                     val voiceNetworkDialogFragment = when (voiceNetworkTypeInt) {
                         TelephonyManager.NETWORK_TYPE_UNKNOWN -> WebViewDialog().type(WebViewDialog.NETWORK_UNKNOWN)
@@ -195,7 +225,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                         TelephonyManager.NETWORK_TYPE_CDMA -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                         TelephonyManager.NETWORK_TYPE_EVDO_0 -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                         TelephonyManager.NETWORK_TYPE_EVDO_A -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
                         TelephonyManager.NETWORK_TYPE_CDMA -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                         TelephonyManager.NETWORK_TYPE_EVDO_0 -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                         TelephonyManager.NETWORK_TYPE_EVDO_A -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
-                        TelephonyManager.NETWORK_TYPE_1xRTT -> WebViewDialog().type(WebViewDialog.NETWORK_1xRTT)
+                        TelephonyManager.NETWORK_TYPE_1xRTT -> WebViewDialog().type(WebViewDialog.NETWORK_1XRTT)
                         TelephonyManager.NETWORK_TYPE_HSDPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                         TelephonyManager.NETWORK_TYPE_HSUPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                         TelephonyManager.NETWORK_TYPE_HSPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
                         TelephonyManager.NETWORK_TYPE_HSDPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                         TelephonyManager.NETWORK_TYPE_HSUPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                         TelephonyManager.NETWORK_TYPE_HSPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
@@ -233,9 +263,25 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                 val dataNetworkStringArray = protocolHelper.getNetworkTypeStringArray(dataNetworkTypeInt, applicationContext)
                 val additionalNetworkInfoStringArray = protocolHelper.getAdditionalNetworkInfoStringArray(additionalNetworkInfoTypeInt, applicationContext)
 
                 val dataNetworkStringArray = protocolHelper.getNetworkTypeStringArray(dataNetworkTypeInt, applicationContext)
                 val additionalNetworkInfoStringArray = protocolHelper.getAdditionalNetworkInfoStringArray(additionalNetworkInfoTypeInt, applicationContext)
 
+                // Get the active data subscription id.
+                val dataSubscriptionId = SubscriptionManager.getActiveDataSubscriptionId()
+
+                // Create the data carrier info string.
+                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) {
+                    // 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}"
+                    else
+                        "${subscriptionManager.getActiveSubscriptionInfo(dataSubscriptionId).carrierName} – ${subscriptionManager.getPhoneNumber(dataSubscriptionId)}"
+                }
+
                 // Populate the data network text views.
                 dataNetworkTextView.text = getString(R.string.data_network, dataNetworkStringArray[0])
                 dataNetworkDetailsTextView.text = dataNetworkStringArray[1]
                 // Populate the data network text views.
                 dataNetworkTextView.text = getString(R.string.data_network, dataNetworkStringArray[0])
                 dataNetworkDetailsTextView.text = dataNetworkStringArray[1]
+                dataNetworkSubscriptionInfoTextView.text = dataSubscriptionInfoString
                 additionalNetworkInfoTextView.text = getString(R.string.additional_network_info, additionalNetworkInfoStringArray[0])
                 additionalNetworkInfoDetailsTextView.text = additionalNetworkInfoStringArray[1]
 
                 additionalNetworkInfoTextView.text = getString(R.string.additional_network_info, additionalNetworkInfoStringArray[0])
                 additionalNetworkInfoDetailsTextView.text = additionalNetworkInfoStringArray[1]
 
@@ -264,7 +310,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                         TelephonyManager.NETWORK_TYPE_CDMA -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                         TelephonyManager.NETWORK_TYPE_EVDO_0 -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                         TelephonyManager.NETWORK_TYPE_EVDO_A -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
                         TelephonyManager.NETWORK_TYPE_CDMA -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                         TelephonyManager.NETWORK_TYPE_EVDO_0 -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                         TelephonyManager.NETWORK_TYPE_EVDO_A -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
-                        TelephonyManager.NETWORK_TYPE_1xRTT -> WebViewDialog().type(WebViewDialog.NETWORK_1xRTT)
+                        TelephonyManager.NETWORK_TYPE_1xRTT -> WebViewDialog().type(WebViewDialog.NETWORK_1XRTT)
                         TelephonyManager.NETWORK_TYPE_HSDPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                         TelephonyManager.NETWORK_TYPE_HSUPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                         TelephonyManager.NETWORK_TYPE_HSPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
                         TelephonyManager.NETWORK_TYPE_HSDPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                         TelephonyManager.NETWORK_TYPE_HSUPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                         TelephonyManager.NETWORK_TYPE_HSPA -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
@@ -334,7 +380,8 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
         super.onStart()
 
         // Check to see if the read phone state permission has been granted.  These commands need to be run on every start so that the listener is reregistered.
         super.onStart()
 
         // Check to see if the read phone state permission has been granted.  These commands need to be run on every start so that the listener is reregistered.
-        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {  // The storage permission has been granted.
+        if ((ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) &&
+            (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_NUMBERS) == PackageManager.PERMISSION_GRANTED)) {  // The phone permissions have been granted.
             // Register the telephony manager listener.
             registerTelephonyManagerListener()
         } else {  // The phone permission has not been granted.
             // Register the telephony manager listener.
             registerTelephonyManagerListener()
         } else {  // The phone permission has not been granted.
@@ -350,7 +397,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
                 }
             } else {  // Show the permission request directly.
                 // Request the read phone state permission.
                 }
             } else {  // Show the permission request directly.
                 // Request the read phone state permission.
-                ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.READ_PHONE_STATE), PHONE_PERMISSION_REQUEST_CODE)
+                ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_PHONE_NUMBERS), PHONE_PERMISSION_REQUEST_CODE)
             }
         }
     }
             }
         }
     }
@@ -570,7 +617,7 @@ class PrivacyCellActivity : AppCompatActivity(), NavigationView.OnNavigationItem
         }
 
         // Set the overall status click listener.
         }
 
         // Set the overall status click listener.
-        overallStatusLinearLayout.setOnClickListener {
+        overallStatusCardView.setOnClickListener {
             // Instantiate the stingray dialog fragment.
             val stingrayDialogFragment = WebViewDialog().type(overallStatusDialogTypeInt)
 
             // Instantiate the stingray dialog fragment.
             val stingrayDialogFragment = WebViewDialog().type(overallStatusDialogTypeInt)
 
index c189c243bcb60307c1071e673069cde4aaf3a6cd..63a55a8e2bb03d5d48f54d780fa7989a3444a35b 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-3.0-or-later
 /* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2022 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2022, 2025 Soren Stoutner <soren@stoutner.com>
  *
  * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell/>.
  *
  *
  * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell/>.
  *
@@ -122,7 +122,7 @@ class ProtocolsActivity : AppCompatActivity() {
                 getString(R.string.cdma_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                 getString(R.string.evdo_0_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                 getString(R.string.evdo_a_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
                 getString(R.string.cdma_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_CDMA)
                 getString(R.string.evdo_0_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_0)
                 getString(R.string.evdo_a_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_EVDO_A)
-                getString(R.string.rtt_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_1xRTT)
+                getString(R.string.rtt_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_1XRTT)
                 getString(R.string.hsdpa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                 getString(R.string.hsupa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                 getString(R.string.hspa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
                 getString(R.string.hsdpa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSDPA)
                 getString(R.string.hsupa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSUPA)
                 getString(R.string.hspa_detail) -> WebViewDialog().type(WebViewDialog.NETWORK_HSPA)
index 9989945e9a4990d1fc5b246f05c0436d7090d6b9..63a4591d04d7662db74157fa98ba0d7a5da5ec03 100644 (file)
@@ -1,20 +1,20 @@
-/*
- * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2021-2022 Soren Stoutner <soren@stoutner.com>
  *
  *
- * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
+ * 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.
+ * This program 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.
+ * This program 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 Cell.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 package com.stoutner.privacycell.dialogs
  */
 
 package com.stoutner.privacycell.dialogs
index 745c7a7bbbef81c74ed25cf1563473680fd3fad8..d8b880cbda17620996a85ef4cdd83a3e971f3907 100644 (file)
@@ -1,20 +1,20 @@
-/*
- * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2021-2022 Soren Stoutner <soren@stoutner.com>
  *
  *
- * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
+ * 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.
+ * This program 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.
+ * This program 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 Cell.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 package com.stoutner.privacycell.dialogs
  */
 
 package com.stoutner.privacycell.dialogs
index aa7d296a141def98def55dd87cfd32b767038b85..071f17cdeac61dd6bbf52318b00d05f478c60bc5 100644 (file)
@@ -1,20 +1,20 @@
-/*
- * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2021-2022, 2025 Soren Stoutner <soren@stoutner.com>
  *
  *
- * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
+ * 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.
+ * This program 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.
+ * This program 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 Cell.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 package com.stoutner.privacycell.dialogs
  */
 
 package com.stoutner.privacycell.dialogs
@@ -54,7 +54,7 @@ class WebViewDialog : DialogFragment() {
         const val NETWORK_CDMA = 11
         const val NETWORK_EVDO_0 = 12
         const val NETWORK_EVDO_A = 13
         const val NETWORK_CDMA = 11
         const val NETWORK_EVDO_0 = 12
         const val NETWORK_EVDO_A = 13
-        const val NETWORK_1xRTT = 14
+        const val NETWORK_1XRTT = 14
         const val NETWORK_HSDPA = 15
         const val NETWORK_HSUPA = 16
         const val NETWORK_HSPA = 17
         const val NETWORK_HSDPA = 15
         const val NETWORK_HSUPA = 16
         const val NETWORK_HSPA = 17
@@ -217,7 +217,7 @@ class WebViewDialog : DialogFragment() {
                 dialogBuilder.setTitle(R.string.evdo_a)
             }
 
                 dialogBuilder.setTitle(R.string.evdo_a)
             }
 
-            NETWORK_1xRTT -> {
+            NETWORK_1XRTT -> {
                 // Set the icon.
                 dialogBuilder.setIcon(R.drawable.protocols)
 
                 // Set the icon.
                 dialogBuilder.setIcon(R.drawable.protocols)
 
@@ -428,7 +428,7 @@ class WebViewDialog : DialogFragment() {
             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_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_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_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")
index e2fe4f1ca11d19b6343e951947e2a1e33b3eebc3..9f0f0332162296c87ec3f1a61a87f1c1e410f39e 100644 (file)
                     <LinearLayout
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                     <LinearLayout
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
-                        android:orientation="vertical"
-                        android:padding="15dp" >
+                        android:orientation="vertical" >
 
                         <!-- Overall status. -->
 
                         <!-- Overall status. -->
-                        <LinearLayout
-                            android:id="@+id/overall_status_linearlayout"
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/overall_status_cardview"
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical"
-                            tools:ignore="UseCompoundDrawables" >
-
-                            <ImageView
-                                android:id="@+id/overall_status_imageview"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                tools:ignore="ContentDescription" />
-
-                            <!-- The text color primary is only displayed if the read phone state permission is not granted.
-                                The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
-                            <TextView
-                                android:id="@+id/overall_status_textview"
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="20dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
+
+                            <LinearLayout
+                                android:id="@+id/overall_status_linearlayout"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginTop="10dp"
-                                android:textColor="?android:textColorPrimary"
-                                android:textSize="20sp"
-                                android:textStyle="bold"
-                                android:text="@string/not_connected" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="20dp"
+                                tools:ignore="UseCompoundDrawables" >
+
+                                <ImageView
+                                    android:id="@+id/overall_status_imageview"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    tools:ignore="ContentDescription" />
+
+                                <!-- The text color primary is only displayed if the read phone state permission is not granted.
+                                    The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
+                                <TextView
+                                    android:id="@+id/overall_status_textview"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:layout_marginTop="10dp"
+                                    android:textColor="?android:textColorPrimary"
+                                    android:textSize="20sp"
+                                    android:textStyle="bold"
+                                    android:text="@string/not_connected" />
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
 
                         <!-- Voice network. -->
 
                         <!-- Voice network. -->
-                        <LinearLayout
-                            android:id="@+id/voice_network_linearlayout"
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/voice_network_cardview"
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/voice_network"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginTop="30dp"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="10dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
 
 
-                            <TextView
-                                android:id="@+id/voice_network_details"
+                            <LinearLayout
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginBottom="10dp" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="15dp" >
+
+                                <TextView
+                                    android:id="@+id/voice_network"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textSize="18sp"
+                                    android:textStyle="bold" />
+
+                                <TextView
+                                    android:id="@+id/voice_network_details"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textColor="?android:textColorPrimary" />
+
+                                <TextView
+                                    android:id="@+id/voice_network_subscription_info"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textSize="12sp" />
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
 
                         <!-- Data network. -->
 
                         <!-- Data network. -->
-                        <LinearLayout
-                            android:id="@+id/data_network_linearlayout"
+                        <androidx.cardview.widget.CardView
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/data_network"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
-
-                            <TextView
-                                android:id="@+id/data_network_details"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginBottom="10dp" />
-                        </LinearLayout>
-
-                        <!-- Additional network info. -->
-                        <LinearLayout
-                            android:id="@+id/additional_network_info_linearlayout"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/additional_network_info"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="10dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
 
 
-                            <TextView
-                                android:id="@+id/additional_network_info_details"
+                            <LinearLayout
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="15dp" >
+
+                                <LinearLayout
+                                    android:id="@+id/data_network_linearlayout"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:orientation="vertical" >
+
+                                    <TextView
+                                        android:id="@+id/data_network"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="18sp"
+                                        android:textStyle="bold"
+                                        tools:ignore="TooDeepLayout" />
+
+                                    <TextView
+                                        android:id="@+id/data_network_details"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textColor="?android:textColorPrimary" />
+
+                                    <TextView
+                                        android:id="@+id/data_network_subscription_info"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="12sp" />
+                                </LinearLayout>
+
+                                <!-- Additional network info. -->
+                                <LinearLayout
+                                    android:id="@+id/additional_network_info_linearlayout"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:orientation="vertical" >
+
+                                    <TextView
+                                        android:id="@+id/additional_network_info"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="18sp"
+                                        android:textStyle="bold" />
+
+                                    <TextView
+                                        android:id="@+id/additional_network_info_details"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textColor="?android:textColorPrimary" />
+                                </LinearLayout>
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
                     </LinearLayout>
                 </ScrollView>
 
                     </LinearLayout>
                 </ScrollView>
 
index 614c2e3bf754913fec5a6bb23494e0290d696989..1f22959a70418b31c064237c2cb353dbc0354bdf 100644 (file)
                     <LinearLayout
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                     <LinearLayout
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
-                        android:orientation="vertical"
-                        android:padding="15dp" >
+                        android:orientation="vertical" >
 
                         <!-- Overall status. -->
 
                         <!-- Overall status. -->
-                        <LinearLayout
-                            android:id="@+id/overall_status_linearlayout"
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/overall_status_cardview"
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical"
-                            tools:ignore="UseCompoundDrawables" >
-
-                            <ImageView
-                                android:id="@+id/overall_status_imageview"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                tools:ignore="ContentDescription" />
-
-                            <!-- The text color primary is only displayed if the read phone state permission is not granted.
-                                The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
-                            <TextView
-                                android:id="@+id/overall_status_textview"
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="20dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
+
+                            <LinearLayout
+                                android:id="@+id/overall_status_linearlayout"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginTop="10dp"
-                                android:textColor="?android:textColorPrimary"
-                                android:textSize="20sp"
-                                android:textStyle="bold"
-                                android:text="@string/not_connected" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="20dp"
+                                tools:ignore="UseCompoundDrawables" >
+
+                                <ImageView
+                                    android:id="@+id/overall_status_imageview"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    tools:ignore="ContentDescription" />
+
+                                <!-- The text color primary is only displayed if the read phone state permission is not granted.
+                                    The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
+                                <TextView
+                                    android:id="@+id/overall_status_textview"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:layout_marginTop="10dp"
+                                    android:textColor="?android:textColorPrimary"
+                                    android:textSize="20sp"
+                                    android:textStyle="bold"
+                                    android:text="@string/not_connected" />
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
 
                         <!-- Voice network. -->
 
                         <!-- Voice network. -->
-                        <LinearLayout
-                            android:id="@+id/voice_network_linearlayout"
+                        <androidx.cardview.widget.CardView
+                            android:id="@+id/voice_network_cardview"
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/voice_network"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginTop="30dp"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="10dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
 
 
-                            <TextView
-                                android:id="@+id/voice_network_details"
+                            <LinearLayout
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginBottom="10dp" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="15dp" >
+
+                                <TextView
+                                    android:id="@+id/voice_network"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textSize="18sp"
+                                    android:textStyle="bold" />
+
+                                <TextView
+                                    android:id="@+id/voice_network_details"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textColor="?android:textColorPrimary" />
+
+                                <TextView
+                                    android:id="@+id/voice_network_subscription_info"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:textAlignment="center"
+                                    android:textSize="12sp" />
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
 
                         <!-- Data network. -->
 
                         <!-- Data network. -->
-                        <LinearLayout
-                            android:id="@+id/data_network_linearlayout"
+                        <androidx.cardview.widget.CardView
                             android:layout_height="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/data_network"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
-
-                            <TextView
-                                android:id="@+id/data_network_details"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:layout_marginBottom="10dp" />
-                        </LinearLayout>
-
-                        <!-- Additional network info. -->
-                        <LinearLayout
-                            android:id="@+id/additional_network_info_linearlayout"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:orientation="vertical" >
-
-                            <TextView
-                                android:id="@+id/additional_network_info"
-                                android:layout_height="wrap_content"
-                                android:layout_width="wrap_content"
-                                android:layout_gravity="center_horizontal"
-                                android:textAlignment="center"
-                                android:textSize="18sp"
-                                android:textStyle="bold" />
+                            android:layout_width="match_parent"
+                            android:layout_marginTop="10dp"
+                            android:layout_marginStart="20dp"
+                            android:layout_marginEnd="20dp"
+                            android:layout_marginBottom="10dp" >
 
 
-                            <TextView
-                                android:id="@+id/additional_network_info_details"
+                            <LinearLayout
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
                                 android:layout_height="wrap_content"
                                 android:layout_width="wrap_content"
                                 android:layout_gravity="center_horizontal"
-                                android:textAlignment="center" />
-                        </LinearLayout>
+                                android:orientation="vertical"
+                                android:layout_margin="15dp" >
+
+                                <LinearLayout
+                                    android:id="@+id/data_network_linearlayout"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:orientation="vertical" >
+
+                                    <TextView
+                                        android:id="@+id/data_network"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="18sp"
+                                        android:textStyle="bold"
+                                        tools:ignore="TooDeepLayout" />
+
+                                    <TextView
+                                        android:id="@+id/data_network_details"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textColor="?android:textColorPrimary" />
+
+                                    <TextView
+                                        android:id="@+id/data_network_subscription_info"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="12sp"
+                                        android:layout_marginBottom="20dp" />
+                                </LinearLayout>
+
+                                <!-- Additional network info. -->
+                                <LinearLayout
+                                    android:id="@+id/additional_network_info_linearlayout"
+                                    android:layout_height="wrap_content"
+                                    android:layout_width="wrap_content"
+                                    android:layout_gravity="center_horizontal"
+                                    android:orientation="vertical" >
+
+                                    <TextView
+                                        android:id="@+id/additional_network_info"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textSize="18sp"
+                                        android:textStyle="bold" />
+
+                                    <TextView
+                                        android:id="@+id/additional_network_info_details"
+                                        android:layout_height="wrap_content"
+                                        android:layout_width="wrap_content"
+                                        android:layout_gravity="center_horizontal"
+                                        android:textAlignment="center"
+                                        android:textColor="?android:textColorPrimary" />
+                                </LinearLayout>
+                            </LinearLayout>
+                        </androidx.cardview.widget.CardView>
                     </LinearLayout>
                 </ScrollView>
             </LinearLayout>
                     </LinearLayout>
                 </ScrollView>
             </LinearLayout>
index 4a18d0c5af83eff60ecf75f27d7e0eb49dab1aed..28bf741f713ce2e8ffc8b330d66859339f946fb5 100644 (file)
 
     <!-- Permission dialogs. -->
     <string name="phone_permission">Phone Permission</string>
 
     <!-- Permission dialogs. -->
     <string name="phone_permission">Phone Permission</string>
-    <string name="phone_permission_text">Privacy Cell needs the Read Phone State permission to determine the safety level of your cell connection.</string>
+    <string name="phone_permission_text">Privacy Cell needs the Read Phone State and Read Phone Numbers permissions to determine the safety level of your cell connection and display the phone number of the
+        active SIM card.</string>
     <string name="notification_permission">Notification Permission</string>
     <string name="notification_permission_text">Privacy Cell needs the Post Notification permission to display realtime monitoring notifications.</string>
     <string name="ok">OK</string>
     <string name="notification_permission">Notification Permission</string>
     <string name="notification_permission_text">Privacy Cell needs the Post Notification permission to display realtime monitoring notifications.</string>
     <string name="ok">OK</string>
index 081b3892319a8fd9a0cdd09111b7c86518fa232f..7bad56669298a06f19bcb907e41879f29efa780c 100644 (file)
@@ -25,7 +25,7 @@ buildscript {
     }
 
     dependencies {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:8.9.1'
+        classpath 'com.android.tools.build:gradle:8.9.2'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0"
 
         // NOTE: Do not place your application dependencies here; they belong
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0"
 
         // NOTE: Do not place your application dependencies here; they belong