Skip to content

Commit

Permalink
Merge branch 'release/4.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bsorrentino committed Oct 25, 2020
2 parents c56fae3 + 7be9884 commit 28b2f1c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-broadcaster",
"version": "4.3.0",
"version": "4.3.1",
"description": "Allow send message from Javascript to Native",
"cordova": {
"id": "cordova-plugin-broadcaster",
Expand All @@ -20,12 +20,8 @@
],
"engines": {
"cordovaDependencies": {
"2.2.1": {
"cordova": ">3.9.0"
},
"2.3.0": {
"cordova": ">4.0.0"
}
"2.2.1": { "cordova": ">3.9.0" },
"2.3.0": { "cordova": ">4.0.0" }
}
},
"author": "bsorrentino",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="cordova-plugin-broadcaster"
version="4.3.0"
version="4.3.1"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<engines>
Expand Down
8 changes: 7 additions & 1 deletion src/android/CDVBroadcaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ static class Data {
if (userData.has("extras") && ( hasFlags || userData.has("category") || userData.has("packageName")) ) {

extras = userData.optJSONObject("extras");
flags = ( hasFlags ) ? Optional.ofNullable( userData.optInt("flags") ) : Optional.empty();
if( hasFlags ) {
flags = Optional.ofNullable( userData.optInt("flags") );
}
else {
flags = Optional.empty();
}

category = Optional.ofNullable(userData.optString("category", null));
packageName = Optional.ofNullable( userData.optString("packageName", null));
isAndroidSpecific = true;
Expand Down

0 comments on commit 28b2f1c

Please sign in to comment.