summaryrefslogtreecommitdiffstats
path: root/src/android/jar
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2014-08-05 19:37:47 +0200
committerChristian Stromme <christian.stromme@digia.com>2014-08-06 17:16:30 +0200
commit4946ed049608251cf750a6250b4c94cda1c2e707 (patch)
tree9742defff7190361b2409815daaa4f38802f0203 /src/android/jar
parent682976def705a094c30a181e129b11c613c8a451 (diff)
Android: Fix QAndroidPlatformServices::openUrl().
Return true only if an activity was found for the intent. Task-number: QTBUG-34716 Change-Id: I764caf1e8afa3b17b2d71f52873c17e5d834a956 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/android/jar')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java7
1 files changed, 6 insertions, 1 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 02bb1ae485..0107cff23a 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -108,15 +108,20 @@ public class QtNative
}
}
- public static void openURL(String url)
+ public static boolean openURL(String url)
{
+ boolean ok = true;
+
try {
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
activity().startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
+ ok = false;
}
+
+ return ok;
}
// this method loads full path libs