mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Filter out non-launchable intents
This commit is contained in:
parent
993d73762c
commit
d6eb723b7f
@ -69,6 +69,9 @@ class CordovaUriHelper {
|
|||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setData(Uri.parse(url));
|
intent.setData(Uri.parse(url));
|
||||||
|
intent.addCategory(Intent.CATEGORY_BROWSABLE);
|
||||||
|
intent.setComponent(null);
|
||||||
|
intent.setSelector(null);
|
||||||
this.cordova.getActivity().startActivity(intent);
|
this.cordova.getActivity().startActivity(intent);
|
||||||
} catch (android.content.ActivityNotFoundException e) {
|
} catch (android.content.ActivityNotFoundException e) {
|
||||||
LOG.e(TAG, "Error loading url " + url, e);
|
LOG.e(TAG, "Error loading url " + url, e);
|
||||||
|
Loading…
Reference in New Issue
Block a user