@@ -1451,20 +1451,24 @@ else if (url.startsWith(INTENT_PROTOCOL_START)) {
1451
1451
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
1452
1452
else if (!url .startsWith ("http:" ) && !url .startsWith ("https:" ) && url .matches ("^[A-Za-z0-9+.-]*://.*?$" )) {
1453
1453
if (allowedSchemes != null ) {
1454
- for (String scheme : allowedSchemes ) {
1455
- if (scheme .equals ("all" ) || url .startsWith (scheme )) {
1456
- LOG .d (LOG_TAG , "execute deeplink [" + url + "]" );
1457
- try {
1458
- cordova .getActivity ().startActivity (new Intent (Intent .ACTION_VIEW , Uri .parse (url )));
1459
- } catch (ActivityNotFoundException e ) {
1460
- LOG .e (LOG_TAG , "not installed deeplink app [" + url + "] : " + e .toString ());
1454
+ try {
1455
+ for (String scheme : allowedSchemes ) {
1456
+ if (scheme != null && (scheme .equals ("all" ) || url .startsWith (scheme ))) {
1457
+ LOG .d (LOG_TAG , "execute deeplink [" + url + "]" );
1458
+ try {
1459
+ cordova .getActivity ().startActivity (new Intent (Intent .ACTION_VIEW , Uri .parse (url )));
1460
+ } catch (ActivityNotFoundException e ) {
1461
+ LOG .e (LOG_TAG , "not installed deeplink app [" + url + "] : " + e .toString ());
1462
+ }
1463
+ override = true ;
1464
+ break ;
1461
1465
}
1462
- override = true ;
1463
- break ;
1464
1466
}
1465
- }
1466
- if (!override ) {
1467
- LOG .e (LOG_TAG , "not allowed this scheme [" + url + "]" );
1467
+ if (!override ) {
1468
+ LOG .e (LOG_TAG , "not allowed this scheme [" + url + "]" );
1469
+ }
1470
+ } catch (NullPointerException e ) {
1471
+ LOG .e (LOG_TAG , "null exception?! : " + e .toString ());
1468
1472
}
1469
1473
} else {
1470
1474
LOG .e (LOG_TAG , "no allowedSchemes" );
0 commit comments