@capacitor/android 4.7.3 → 4.8.0

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,20 @@
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
+ # [4.8.0](https://github.com/ionic-team/capacitor/compare/4.7.3...4.8.0) (2023-04-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **android:** launching intents without host ([#6493](https://github.com/ionic-team/capacitor/issues/6493)) ([6028ff4](https://github.com/ionic-team/capacitor/commit/6028ff482b489c150e348a3b536387c321b39b80))
12
+ * **cookies:** check isEnabled before setting cookieHandler ([24a28cb](https://github.com/ionic-team/capacitor/commit/24a28cb0a391dcd7f305000c4973b4c2c9a79359))
13
+ * **cookies:** init cookie manager after server url is set ([4000b02](https://github.com/ionic-team/capacitor/commit/4000b0259223fcd505bbd5393e2458f0abd3b156))
14
+ * **http:** copy native response url to fetch response ([42d2eb3](https://github.com/ionic-team/capacitor/commit/42d2eb3c3c04e087b88df7252cd2c323b00a3f95))
15
+
16
+
17
+
18
+
19
+
6
20
  ## [4.7.3](https://github.com/ionic-team/capacitor/compare/4.7.2...4.7.3) (2023-03-31)
7
21
 
8
22
 
@@ -392,6 +392,14 @@ var nativeBridge = (function (exports) {
392
392
  headers: nativeResponse.headers,
393
393
  status: nativeResponse.status,
394
394
  });
395
+ /*
396
+ * copy url to response, `cordova-plugin-ionic` uses this url from the response
397
+ * we need `Object.defineProperty` because url is an inherited getter on the Response
398
+ * see: https://stackoverflow.com/a/57382543
399
+ * */
400
+ Object.defineProperty(response, 'url', {
401
+ value: nativeResponse.url,
402
+ });
395
403
  console.timeEnd(tag);
396
404
  return response;
397
405
  }
@@ -371,7 +371,7 @@ public class Bridge {
371
371
 
372
372
  Uri appUri = Uri.parse(appUrl);
373
373
  if (
374
- !(url.getHost().equals(appUri.getHost()) && url.getScheme().equals(appUri.getScheme())) &&
374
+ !(appUri.getHost().equals(url.getHost()) && url.getScheme().equals(appUri.getScheme())) &&
375
375
  !appAllowNavigationMask.matches(url.getHost())
376
376
  ) {
377
377
  try {
@@ -20,15 +20,18 @@ public class CapacitorCookies extends Plugin {
20
20
  @Override
21
21
  public void load() {
22
22
  this.bridge.getWebView().addJavascriptInterface(this, "CapacitorCookiesAndroidInterface");
23
- this.cookieManager = new CapacitorCookieManager(null, java.net.CookiePolicy.ACCEPT_ALL, this.bridge);
24
- CookieHandler.setDefault(cookieManager);
25
23
  super.load();
26
24
  }
27
25
 
28
26
  @JavascriptInterface
29
27
  public boolean isEnabled() {
30
28
  PluginConfig pluginConfig = getBridge().getConfig().getPluginConfiguration("CapacitorCookies");
31
- return pluginConfig.getBoolean("enabled", false);
29
+ boolean isEnabled = pluginConfig.getBoolean("enabled", false);
30
+ if (isEnabled) {
31
+ this.cookieManager = new CapacitorCookieManager(null, java.net.CookiePolicy.ACCEPT_ALL, this.bridge);
32
+ CookieHandler.setDefault(cookieManager);
33
+ }
34
+ return isEnabled;
32
35
  }
33
36
 
34
37
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/android",
3
- "version": "4.7.3",
3
+ "version": "4.8.0",
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)",
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "aa522964a8521f65b95e4233993019e3fe2531a4"
31
+ "gitHead": "b43c69d9d6530fa1a0cc461d6db14859865ed995"
32
32
  }