From 90fb3640ed507c5396feaaefa3b3463d49380d6a Mon Sep 17 00:00:00 2001 From: Juan Miguel Boyero Corral Date: Mon, 23 May 2022 18:15:09 +0200 Subject: [PATCH] Fixed #388. Fixed notifications downloads on Android 12 (S) (#389) --- .github/ISSUE_TEMPLATE/bug_report.md | 12 +++--------- SWADroid/build.gradle | 6 +++--- .../modules/notifications/Notifications.java | 2 +- .../NotificationsSyncAdapterService.java | 2 +- SWADroid/src/main/res/raw-es/changes.html | 5 +++++ SWADroid/src/main/res/raw/changes.html | 5 +++++ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b7353733..01982253 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,16 +20,10 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + - Device: [e.g. Google Pixel 2 XL] + - OS: [e.g. Android 12 (S)] + - Version: [e.g. 1.5.8] **Additional context** Add any other context about the problem here. diff --git a/SWADroid/build.gradle b/SWADroid/build.gradle index aad58ad9..6ef1595f 100644 --- a/SWADroid/build.gradle +++ b/SWADroid/build.gradle @@ -39,8 +39,8 @@ if (build_param != "prod") { } android { - compileSdkVersion 31 - buildToolsVersion "31.0.0" + compileSdkVersion 32 + buildToolsVersion "32.0.0" compileOptions { sourceCompatibility JavaVersion.VERSION_11 @@ -57,7 +57,7 @@ android { versionCode androidGitVersion.code() minSdkVersion 24 - targetSdkVersion 31 + targetSdkVersion 32 testApplicationId "es.ugr.swad.swadroid.test" testInstrumentationRunner "android.test.InstrumentationTestRunner" diff --git a/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/Notifications.java b/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/Notifications.java index 10bd52e6..c1f5700e 100644 --- a/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/Notifications.java +++ b/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/Notifications.java @@ -494,7 +494,7 @@ public class Notifications extends Module implements pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, notificationIntent, - PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE); if (!SyncUtils.isSyncAutomatically(getApplicationContext())) { if (notifCount > 0) { diff --git a/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/NotificationsSyncAdapterService.java b/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/NotificationsSyncAdapterService.java index 862a4ed6..5a8949d2 100644 --- a/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/NotificationsSyncAdapterService.java +++ b/SWADroid/src/main/java/es/ugr/swad/swadroid/modules/notifications/NotificationsSyncAdapterService.java @@ -433,7 +433,7 @@ public class NotificationsSyncAdapterService extends Service { pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, - PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT); + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE); //Notify synchronization start Intent startIntent = new Intent(); diff --git a/SWADroid/src/main/res/raw-es/changes.html b/SWADroid/src/main/res/raw-es/changes.html index c66c64ee..dc75379e 100644 --- a/SWADroid/src/main/res/raw-es/changes.html +++ b/SWADroid/src/main/res/raw-es/changes.html @@ -23,6 +23,11 @@
  • Añadido módulo para localización en interiores
  • --> +

    1.5.8 (2022-05-23)

    + +

    1.5.7 (2020-12-19)

    --> +

    1.5.8 (2022-05-23)

    + +

    1.5.7 (2020-12-19)