Remove clientid from the url before it is added to the database. So that we
won't show them in the auto-complete list.
Update the browser.db and remove history only entries who has clientid.
Fix http://b/issue?id=2099727
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 3b0745e..887f832 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2701,6 +2701,17 @@
if (url.regionMatches(true, 0, "about:", 0, 6)) {
return;
}
+ // remove "client" before updating it to the history so that it wont
+ // show up in the auto-complete list.
+ int index = url.indexOf("client=ms-");
+ if (index > 0 && url.contains(".google.")) {
+ int end = url.indexOf('&', index);
+ if (end > 0) {
+ url = url.substring(0, index-1).concat(url.substring(end));
+ } else {
+ url = url.substring(0, index-1);
+ }
+ }
Browser.updateVisitedHistory(mResolver, url, true);
WebIconDatabase.getInstance().retainIconForPageUrl(url);
}