From 0797811d24cfaab7a49ec071c8a752e950213981 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Thu, 4 Nov 2021 14:43:21 -0700 Subject: [PATCH] Remove unneeded permissions added by `androidx.work`. https://redmine.stoutner.com/issues/775 --- app/src/main/AndroidManifest.xml | 5 +++++ app/src/main/assets/en/changelog.html | 4 ++-- app/src/main/assets/es/changelog.html | 4 ++-- app/src/main/assets/fr/changelog.html | 4 ++-- app/src/main/assets/it/changelog.html | 4 ++-- app/src/main/assets/ru/changelog.html | 4 ++-- .../stoutner/privacycell/workers/RegisterRealtimeListener.kt | 4 ++-- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2196ce8..be16e6e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -21,6 +21,7 @@ @@ -33,6 +34,10 @@ + + + + diff --git a/app/src/main/assets/en/changelog.html b/app/src/main/assets/en/changelog.html index bc6ea83..2be83f3 100644 --- a/app/src/main/assets/en/changelog.html +++ b/app/src/main/assets/en/changelog.html @@ -27,8 +27,8 @@ -

1.5 (version code 6)

-

3 November 2021 - minimum API 30, target API 31

+

1.5 (version code 6)

+

3 November 2021 - minimum API 30, target API 31

  • Fix a crash with realtime monitoring if the READ_PHONE_STATE permission is denied.
  • Bump the target API to 31 (Android 12).
  • diff --git a/app/src/main/assets/es/changelog.html b/app/src/main/assets/es/changelog.html index b17dfe4..824827f 100644 --- a/app/src/main/assets/es/changelog.html +++ b/app/src/main/assets/es/changelog.html @@ -29,8 +29,8 @@ -

    1.5 (versión del código 6)

    -

    3 de noviembre de 2021 - API mínimo 30, API objetivo 31

    +

    1.5 (versión del código 6)

    +

    3 de noviembre de 2021 - API mínimo 30, API objetivo 31

    • Corregir una colisión con la monitorización en tiempo realsi se deniega el permiso READ_PHONE_STATE.
    • Aumentar el objetivo API a 31 (Android 12).
    • diff --git a/app/src/main/assets/fr/changelog.html b/app/src/main/assets/fr/changelog.html index 2d3530a..74ce7de 100644 --- a/app/src/main/assets/fr/changelog.html +++ b/app/src/main/assets/fr/changelog.html @@ -29,8 +29,8 @@ -

      1.5 (version de code 6)

      -

      3 Novembre 2021 - API minimum 30, API cible 31

      +

      1.5 (version de code 6)

      +

      3 Novembre 2021 - API minimum 30, API cible 31

      • Correction d'un plantage avec la supervision temps-réel si la permission READ_PHONE_STATE était désactivée.
      • Page de l'API cible à 31 (Android 12).
      • diff --git a/app/src/main/assets/it/changelog.html b/app/src/main/assets/it/changelog.html index d5a1903..0bde345 100644 --- a/app/src/main/assets/it/changelog.html +++ b/app/src/main/assets/it/changelog.html @@ -29,8 +29,8 @@ -

        1.5 (versione codice 6)

        -

        3 Novembre 2021 - minima API 30, target API 31

        +

        1.5 (versione codice 6)

        +

        3 Novembre 2021 - minima API 30, target API 31

        • Sistemazione di un crash durante il monitoraggio in tempo reale nel caso in cui l'autorizzazione READ_PHONE_STATE sia negata.
        • Spostamento della target API a 31 (Android 12).
        • diff --git a/app/src/main/assets/ru/changelog.html b/app/src/main/assets/ru/changelog.html index b4aaf37..ba7bc5e 100644 --- a/app/src/main/assets/ru/changelog.html +++ b/app/src/main/assets/ru/changelog.html @@ -27,8 +27,8 @@ -

          1.5 (код версии 6)

          -

          3 ноября 2021 года - минимальный API 30, целевой API 31

          +

          1.5 (код версии 6)

          +

          3 ноября 2021 года - минимальный API 30, целевой API 31

          • Исправлен сбой в работе мониторинга в реальном времени, если не было предоставлено разрешение READ_PHONE_STATE.
          • Повышен целевой API до 31 (Android 12).
          • diff --git a/app/src/main/java/com/stoutner/privacycell/workers/RegisterRealtimeListener.kt b/app/src/main/java/com/stoutner/privacycell/workers/RegisterRealtimeListener.kt index b2cd834..8677470 100644 --- a/app/src/main/java/com/stoutner/privacycell/workers/RegisterRealtimeListener.kt +++ b/app/src/main/java/com/stoutner/privacycell/workers/RegisterRealtimeListener.kt @@ -53,8 +53,8 @@ class RegisterRealtimeListener (appContext: Context, workerParams: WorkerParamet // Check to see if the service is currently running. if (runningServiceInfoList.isEmpty()) { // The service is currently stopped. - // Start the service. - applicationContext.startService(Intent(applicationContext, RealtimeMonitoringService::class.java)) + // Start the service as a foreground service, which is required because the worker is running in the background. + applicationContext.startForegroundService(Intent(applicationContext, RealtimeMonitoringService::class.java)) } else { // The service is currently running. // Create a service connection. val serviceConnection = object : ServiceConnection { -- 2.45.2