@capacitor/android 3.3.2 → 3.3.3

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.3.3](https://github.com/ionic-team/capacitor/compare/3.3.2...3.3.3) (2021-12-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **android:** Prevent crash in restoreInstanceState if bundleData is null ([#5289](https://github.com/ionic-team/capacitor/issues/5289)) ([622d62f](https://github.com/ionic-team/capacitor/commit/622d62fc0d7cd79558bf6f11331bd7d6690aa4f9))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.3.2](https://github.com/ionic-team/capacitor/compare/3.3.1...3.3.2) (2021-11-17)
7
18
 
8
19
 
@@ -807,8 +807,10 @@ public class Bridge {
807
807
  // Let the plugin restore any state it needs
808
808
  Bundle bundleData = savedInstanceState.getBundle(BUNDLE_PLUGIN_CALL_BUNDLE_KEY);
809
809
  PluginHandle lastPlugin = getPlugin(lastPluginId);
810
- if (lastPlugin != null) {
810
+ if (bundleData != null && lastPlugin != null) {
811
811
  lastPlugin.getInstance().restoreState(bundleData);
812
+ } else {
813
+ Logger.error("Unable to restore last plugin call");
812
814
  }
813
815
  }
814
816
  }
@@ -823,10 +825,15 @@ public class Bridge {
823
825
  PluginHandle handle = getPlugin(call.getPluginId());
824
826
 
825
827
  if (handle != null) {
826
- outState.putString(BUNDLE_LAST_PLUGIN_ID_KEY, call.getPluginId());
827
- outState.putString(BUNDLE_LAST_PLUGIN_CALL_METHOD_NAME_KEY, call.getMethodName());
828
- outState.putString(BUNDLE_PLUGIN_CALL_OPTIONS_SAVED_KEY, call.getData().toString());
829
- outState.putBundle(BUNDLE_PLUGIN_CALL_BUNDLE_KEY, handle.getInstance().saveInstanceState());
828
+ Bundle bundle = handle.getInstance().saveInstanceState();
829
+ if (bundle != null) {
830
+ outState.putString(BUNDLE_LAST_PLUGIN_ID_KEY, call.getPluginId());
831
+ outState.putString(BUNDLE_LAST_PLUGIN_CALL_METHOD_NAME_KEY, call.getMethodName());
832
+ outState.putString(BUNDLE_PLUGIN_CALL_OPTIONS_SAVED_KEY, call.getData().toString());
833
+ outState.putBundle(BUNDLE_PLUGIN_CALL_BUNDLE_KEY, bundle);
834
+ } else {
835
+ Logger.error("Couldn't save last " + call.getPluginId() + "'s Plugin " + call.getMethodName() + " call");
836
+ }
830
837
  }
831
838
  }
832
839
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "3158cd9a293ac79de801c833bb937d2df54e0d96"
30
+ "gitHead": "cd8221ed0162454d2ee01dc3bc164de38a81bf43"
31
31
  }