STK: Fix ActivityNotFoundException in 'launch browser' cmd.
Fix ActivityNotFoundException while handling 'launch browser' STK command.
If URL does not start with 'http://', it causes FATAL EXCEPTION.
Bug: 5559107
Change-Id: I5af43eb4d584412e294f3789f60513de22a7b043
Signed-off-by: dujin.cha <dujin.cha@samsung.com>
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 7fd639f..6aa7e9e 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -653,7 +653,14 @@
Uri data;
if (settings.url != null) {
- data = Uri.parse(settings.url);
+ CatLog.d(this, "settings.url = " + settings.url);
+ if (settings.url.startsWith("http://")) {
+ data = Uri.parse(settings.url);
+ } else {
+ String modifiedUrl = "http://" + settings.url;
+ CatLog.d(this, "modifiedUrl = " + modifiedUrl);
+ data = Uri.parse(modifiedUrl);
+ }
} else {
// If no URL specified, just bring up the "home page".
//