summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2013-11-06 15:47:58 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 17:47:25 +0100
commit2dd6c23395d0b9476033e3d3e8759487bb15ce91 (patch)
treefba60de77993245fe99bc9c41cf072eb68694432 /src/android
parent8ef5e700b8471b865328472b52a790686507bb45 (diff)
Android: Catch any startActivity exceptions
Task-number: QTBUG-34600 Change-Id: I7147f0e6b7788df9e706e70758300d4d786032fc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index 67093a007e..b0ce1bb7f2 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -109,9 +109,13 @@ public class QtNative
public static void openURL(String url)
{
- Uri uri = Uri.parse(url);
- Intent intent = new Intent(Intent.ACTION_VIEW, uri);
- activity().startActivity(intent);
+ try {
+ Uri uri = Uri.parse(url);
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ activity().startActivity(intent);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
// this method loads full path libs