@capacitor/android 7.4.4 → 7.4.5

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.
@@ -466,9 +466,9 @@ public class Bridge {
466
466
  if (ex instanceof SocketTimeoutException) {
467
467
  Logger.error(
468
468
  "Unable to load app. Ensure the server is running at " +
469
- appUrl +
470
- ", or modify the " +
471
- "appUrl setting in capacitor.config.json (make sure to npx cap copy after to commit changes).",
469
+ appUrl +
470
+ ", or modify the " +
471
+ "appUrl setting in capacitor.config.json (make sure to npx cap copy after to commit changes).",
472
472
  ex
473
473
  );
474
474
  }
@@ -752,9 +752,9 @@ public class Bridge {
752
752
  private void logInvalidPluginException(Class<? extends Plugin> clazz) {
753
753
  Logger.error(
754
754
  "NativePlugin " +
755
- clazz.getName() +
756
- " is invalid. Ensure the @CapacitorPlugin annotation exists on the plugin class and" +
757
- " the class extends Plugin"
755
+ clazz.getName() +
756
+ " is invalid. Ensure the @CapacitorPlugin annotation exists on the plugin class and" +
757
+ " the class extends Plugin"
758
758
  );
759
759
  }
760
760
 
@@ -829,13 +829,13 @@ public class Bridge {
829
829
  if (Logger.shouldLog()) {
830
830
  Logger.verbose(
831
831
  "callback: " +
832
- call.getCallbackId() +
833
- ", pluginId: " +
834
- plugin.getId() +
835
- ", methodName: " +
836
- methodName +
837
- ", methodData: " +
838
- call.getData().toString()
832
+ call.getCallbackId() +
833
+ ", pluginId: " +
834
+ plugin.getId() +
835
+ ", methodName: " +
836
+ methodName +
837
+ ", methodData: " +
838
+ call.getData().toString()
839
839
  );
840
840
  }
841
841
 
@@ -64,16 +64,16 @@ public class JSExport {
64
64
  for (PluginHandle plugin : plugins) {
65
65
  lines.add(
66
66
  "(function(w) {\n" +
67
- "var a = (w.Capacitor = w.Capacitor || {});\n" +
68
- "var p = (a.Plugins = a.Plugins || {});\n" +
69
- "var t = (p['" +
70
- plugin.getId() +
71
- "'] = {});\n" +
72
- "t.addListener = function(eventName, callback) {\n" +
73
- " return w.Capacitor.addListener('" +
74
- plugin.getId() +
75
- "', eventName, callback);\n" +
76
- "}"
67
+ "var a = (w.Capacitor = w.Capacitor || {});\n" +
68
+ "var p = (a.Plugins = a.Plugins || {});\n" +
69
+ "var t = (p['" +
70
+ plugin.getId() +
71
+ "'] = {});\n" +
72
+ "t.addListener = function(eventName, callback) {\n" +
73
+ " return w.Capacitor.addListener('" +
74
+ plugin.getId() +
75
+ "', eventName, callback);\n" +
76
+ "}"
77
77
  );
78
78
  Collection<PluginMethodHandle> methods = plugin.getMethods();
79
79
  for (PluginMethodHandle method : methods) {
@@ -171,12 +171,12 @@ public class JSExport {
171
171
  case PluginMethod.RETURN_NONE:
172
172
  lines.add(
173
173
  "return w.Capacitor.nativeCallback('" +
174
- plugin.getId() +
175
- "', '" +
176
- method.getName() +
177
- "', " +
178
- CATCHALL_OPTIONS_PARAM +
179
- ")"
174
+ plugin.getId() +
175
+ "', '" +
176
+ method.getName() +
177
+ "', " +
178
+ CATCHALL_OPTIONS_PARAM +
179
+ ")"
180
180
  );
181
181
  break;
182
182
  case PluginMethod.RETURN_PROMISE:
@@ -187,14 +187,14 @@ public class JSExport {
187
187
  case PluginMethod.RETURN_CALLBACK:
188
188
  lines.add(
189
189
  "return w.Capacitor.nativeCallback('" +
190
- plugin.getId() +
191
- "', '" +
192
- method.getName() +
193
- "', " +
194
- CATCHALL_OPTIONS_PARAM +
195
- ", " +
196
- CALLBACK_PARAM +
197
- ")"
190
+ plugin.getId() +
191
+ "', '" +
192
+ method.getName() +
193
+ "', " +
194
+ CATCHALL_OPTIONS_PARAM +
195
+ ", " +
196
+ CALLBACK_PARAM +
197
+ ")"
198
198
  );
199
199
  break;
200
200
  default:
@@ -69,13 +69,13 @@ public class MessageHandler {
69
69
  Logger.verbose(
70
70
  Logger.tags("Plugin"),
71
71
  "To native (Cordova plugin): callbackId: " +
72
- callbackId +
73
- ", service: " +
74
- service +
75
- ", action: " +
76
- action +
77
- ", actionArgs: " +
78
- actionArgs
72
+ callbackId +
73
+ ", service: " +
74
+ service +
75
+ ", action: " +
76
+ action +
77
+ ", actionArgs: " +
78
+ actionArgs
79
79
  );
80
80
 
81
81
  this.callCordovaPluginMethod(callbackId, service, action, actionArgs);
@@ -47,30 +47,30 @@ public class CapacitorCookies extends Plugin {
47
47
  @PluginMethod
48
48
  public void getCookies(PluginCall call) {
49
49
  this.bridge.eval("document.cookie", (value) -> {
50
- String cookies = value.substring(1, value.length() - 1);
51
- String[] cookieArray = cookies.split(";");
50
+ String cookies = value.substring(1, value.length() - 1);
51
+ String[] cookieArray = cookies.split(";");
52
52
 
53
- JSObject cookieMap = new JSObject();
53
+ JSObject cookieMap = new JSObject();
54
54
 
55
- for (String cookie : cookieArray) {
56
- if (cookie.length() > 0) {
57
- String[] keyValue = cookie.split("=", 2);
55
+ for (String cookie : cookieArray) {
56
+ if (cookie.length() > 0) {
57
+ String[] keyValue = cookie.split("=", 2);
58
58
 
59
- if (keyValue.length == 2) {
60
- String key = keyValue[0].trim();
61
- String val = keyValue[1].trim();
62
- try {
63
- key = URLDecoder.decode(keyValue[0].trim(), StandardCharsets.UTF_8.name());
64
- val = URLDecoder.decode(keyValue[1].trim(), StandardCharsets.UTF_8.name());
65
- } catch (UnsupportedEncodingException ignored) {}
59
+ if (keyValue.length == 2) {
60
+ String key = keyValue[0].trim();
61
+ String val = keyValue[1].trim();
62
+ try {
63
+ key = URLDecoder.decode(keyValue[0].trim(), StandardCharsets.UTF_8.name());
64
+ val = URLDecoder.decode(keyValue[1].trim(), StandardCharsets.UTF_8.name());
65
+ } catch (UnsupportedEncodingException ignored) {}
66
66
 
67
- cookieMap.put(key, val);
68
- }
67
+ cookieMap.put(key, val);
69
68
  }
70
69
  }
70
+ }
71
71
 
72
- call.resolve(cookieMap);
73
- });
72
+ call.resolve(cookieMap);
73
+ });
74
74
  }
75
75
 
76
76
  @PluginMethod
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "7.4.4",
3
+ "version": "7.4.5",
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)",