CB-12010 (android) Catch FileUriExposedException
This commit is contained in:
parent
32253b96a6
commit
ab696f6ebd
@ -383,7 +383,8 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName());
|
intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName());
|
||||||
this.cordova.getActivity().startActivity(intent);
|
this.cordova.getActivity().startActivity(intent);
|
||||||
return "";
|
return "";
|
||||||
} catch (android.content.ActivityNotFoundException e) {
|
// not catching FileUriExposedException explicitly because buildtools<24 doesn't know about it
|
||||||
|
} catch (java.lang.RuntimeException e) {
|
||||||
LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString());
|
LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString());
|
||||||
return e.toString();
|
return e.toString();
|
||||||
}
|
}
|
||||||
@ -524,7 +525,7 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
hadwareBackButton = hardwareBack.booleanValue();
|
hadwareBackButton = hardwareBack.booleanValue();
|
||||||
} else {
|
} else {
|
||||||
hadwareBackButton = DEFAULT_HARDWARE_BACK;
|
hadwareBackButton = DEFAULT_HARDWARE_BACK;
|
||||||
}
|
}
|
||||||
Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION);
|
Boolean mediaPlayback = features.get(MEDIA_PLAYBACK_REQUIRES_USER_ACTION);
|
||||||
if (mediaPlayback != null) {
|
if (mediaPlayback != null) {
|
||||||
mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue();
|
mediaPlaybackRequiresUserGesture = mediaPlayback.booleanValue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user