@capacitor/browser 7.0.0-alpha.1 → 7.0.0-alpha.2

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.
@@ -60,25 +60,25 @@ public class BrowserPlugin extends Plugin {
60
60
  }
61
61
 
62
62
  // open the browser and finish
63
- try {
64
- Intent intent = new Intent(getContext(), BrowserControllerActivity.class);
65
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
66
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
67
- getContext().startActivity(intent);
68
63
 
69
- Integer finalToolbarColor = toolbarColor;
70
- setBrowserControllerListener(
71
- activity -> {
64
+ Intent intent = new Intent(getContext(), BrowserControllerActivity.class);
65
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
66
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
67
+ getContext().startActivity(intent);
68
+
69
+ Integer finalToolbarColor = toolbarColor;
70
+ setBrowserControllerListener(
71
+ activity -> {
72
+ try {
72
73
  activity.open(implementation, url, finalToolbarColor);
73
74
  browserControllerActivityInstance = activity;
74
75
  call.resolve();
76
+ } catch (ActivityNotFoundException ex) {
77
+ Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
78
+ call.reject("Unable to display URL");
75
79
  }
76
- );
77
- } catch (ActivityNotFoundException ex) {
78
- Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
79
- call.reject("Unable to display URL");
80
- return;
81
- }
80
+ }
81
+ );
82
82
  }
83
83
 
84
84
  @PluginMethod
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/browser",
3
- "version": "7.0.0-alpha.1",
3
+ "version": "7.0.0-alpha.2",
4
4
  "description": "The Browser API provides the ability to open an in-app browser and subscribe to browser events.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "2158e6aa205a584a258c34f606e694fdf31cdcc0"
84
+ "gitHead": "023f53b42a81049b7cdef6c7b0102b85b4df1c01"
85
85
  }