Add support for "browser:" protocol
- Prevent browser:incognito from regular tab
The browser will now allow "browser:" protocol
based urls and treat "chrome:" protocol based urls
as a search query
Change-Id: I23098f160f4bd4e5f3c4ec431364388cf4e38790
diff --git a/src/com/android/browser/UrlUtils.java b/src/com/android/browser/UrlUtils.java
index 4d3dee4..e5fd17e 100755
--- a/src/com/android/browser/UrlUtils.java
+++ b/src/com/android/browser/UrlUtils.java
@@ -47,7 +47,7 @@
static final Pattern ACCEPTED_URI_SCHEMA = Pattern.compile(
"(?i)" + // switch on case insensitive matching
"(" + // begin group for schema
- "(?:http|https|file|chrome):\\/\\/" +
+ "(?:http|https|file|browser):\\/\\/" +
"|(?:inline|data|about|javascript):" +
")" +
"(.*)" );
@@ -206,8 +206,7 @@
if (inUrl == null) {
return "";
}
- if (inUrl.startsWith("content:")
- || inUrl.startsWith("browser:")) {
+ if (inUrl.startsWith("content:")) {
return "";
}
return inUrl;