From cddaa013adf6d0f492635bc560c2f7507ebc191a Mon Sep 17 00:00:00 2001 From: Shankari Date: Sat, 11 Mar 2023 21:52:19 -0800 Subject: [PATCH 1/2] Ensure that all pending intents have the IMMUTABLE tag Per https://developer.android.com/guide/components/intents-filters#CreateImmutablePendingIntents > In most cases, your app should create immutable PendingIntent objects, as > shown in the following code snippet. If a PendingIntent object is immutable, > then other apps cannot modify the intent to adjust the result of invoking the > intent. Our usage here falls into this common case, so we can just make them be immutable --- src/android/NotificationHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/NotificationHelper.java b/src/android/NotificationHelper.java index c83a339..1c7224b 100644 --- a/src/android/NotificationHelper.java +++ b/src/android/NotificationHelper.java @@ -51,7 +51,7 @@ public static void createNotification(Context context, int id, String title, Str activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent activityPendingIntent = PendingIntent.getActivity(context, 0, - activityIntent, PendingIntent.FLAG_UPDATE_CURRENT); + activityIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); builder.setContentIntent(activityPendingIntent); Log.d(context, TAG, "Generating notify with id " + id + " and message " + message); @@ -85,7 +85,7 @@ public static void createResolveNotification(Context context, int id, String tit activityIntent.putExtra(NotificationHelper.RESOLUTION_PENDING_INTENT_KEY, intent); PendingIntent activityPendingIntent = PendingIntent.getActivity(context, 0, - activityIntent, PendingIntent.FLAG_UPDATE_CURRENT); + activityIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); builder.setContentIntent(activityPendingIntent); // builder.setAutoCancel(true); From a14f63577779f8ebb8e626e503de544af2cc5465 Mon Sep 17 00:00:00 2001 From: Shankari Date: Thu, 16 Mar 2023 20:17:25 -0700 Subject: [PATCH 2/2] Bump up the version number --- package.json | 2 +- plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 862a5fc..c014792 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-em-unifiedlogger", - "version": "1.3.5", + "version": "1.3.6", "description": "Simple package that stores all the connection settings that need to be configured", "license": "BSD-3-clause", "cordova": { diff --git a/plugin.xml b/plugin.xml index 674ee4d..4cd18ea 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="1.3.6"> UnifiedLogger Log messages from both native code and javacript. Since this is