@@ -60,25 +60,25 @@ public void open(PluginCall call) {
6060 }
6161
6262 // 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 );
6863
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 {
7273 activity .open (implementation , url , finalToolbarColor );
7374 browserControllerActivityInstance = activity ;
7475 call .resolve ();
76+ } catch (ActivityNotFoundException ex ) {
77+ Logger .error (getLogTag (), ex .getLocalizedMessage (), null );
78+ call .reject ("Unable to display URL" );
7579 }
76- );
77- } catch (ActivityNotFoundException ex ) {
78- Logger .error (getLogTag (), ex .getLocalizedMessage (), null );
79- call .reject ("Unable to display URL" );
80- return ;
81- }
80+ }
81+ );
8282 }
8383
8484 @ PluginMethod
0 commit comments