am ef292158: We should handle all four cases when strip the "client". We were incorrect in the third case.
Merge commit 'ef2921584e0c2f425d673dfd2c912b287a6faa5a' into eclair-mr2
* commit 'ef2921584e0c2f425d673dfd2c912b287a6faa5a':
We should handle all four cases when strip the "client".
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 78664a0..45b2cdd 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2975,8 +2975,10 @@
if (index > 0 && url.contains(".google.")) {
int end = url.indexOf('&', index);
if (end > 0) {
- url = url.substring(0, index-1).concat(url.substring(end));
+ url = url.substring(0, index)
+ .concat(url.substring(end + 1));
} else {
+ // the url.charAt(index-1) should be either '?' or '&'
url = url.substring(0, index-1);
}
}