@situm/cordova 3.15.44 → 3.15.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ ### Fixed
2
+ - Added defensive code to avoid race conditions when using ttsManager variable at PluginHelper.java
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@situm/cordova",
3
- "version": "3.15.44",
3
+ "version": "3.15.45",
4
4
  "description": "Situm Wayfinding for Capacitor and Cordova. Integrate plug&play indoor navigation experience with floorplans, POIs, routes and turn-by-turn directions in no time. With the power of Situm.",
5
5
  "private": false,
6
6
  "repository": "https://github.com/situmtech/cordova",
package/plugin.xml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
4
  id="@situm/cordova"
5
- version="3.15.44">
5
+ version="3.15.45">
6
6
  <name>Situm Cordova plugin Official</name>
7
7
  <description>This is the stable branch.</description>
8
8
  <license>MIT</license>
@@ -115,16 +115,22 @@ public class PluginHelper {
115
115
  }
116
116
 
117
117
  public void onResume() {
118
- ttsManager.setCanSpeak(true);
118
+ if (ttsManager != null) {
119
+ ttsManager.setCanSpeak(true);
120
+ }
119
121
  }
120
122
 
121
123
  public void onPause() {
122
- ttsManager.setCanSpeak(false);
124
+ if (ttsManager != null) {
125
+ ttsManager.setCanSpeak(false);
126
+ }
123
127
  }
124
128
 
125
129
  public void onDestroy() {
126
- ttsManager.stop();
127
- ttsManager = null;
130
+ if (ttsManager != null) {
131
+ ttsManager.stop();
132
+ ttsManager = null;
133
+ }
128
134
  locationListener = null;
129
135
  locationRequest = null;
130
136
  navigationListener = null;
@@ -1048,6 +1054,8 @@ public class PluginHelper {
1048
1054
  }
1049
1055
 
1050
1056
  private void _handleSpeakAloudText(CordovaInterface cordova, JSONObject payload) {
1051
- ttsManager.speak(payload);
1057
+ if (ttsManager != null) {
1058
+ ttsManager.speak(payload);
1059
+ }
1052
1060
  }
1053
1061
  }