diff options
author | John Reck <jreck@google.com> | 2011-03-03 10:47:40 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-03 10:47:40 -0800 |
commit | b52c0d8be3486e0e2d89a39c521daa5020605ac2 (patch) | |
tree | 3ba9a2aaf3a18d2ab26cf70d32fe6647623bd4ec | |
parent | 42cb9d2b676c01476c81bc62532c71e9058c6661 (diff) | |
parent | 49a603c11b00b6e68a54e070abf4eb33eaddfa84 (diff) | |
download | packages_apps_Browser-b52c0d8be3486e0e2d89a39c521daa5020605ac2.zip packages_apps_Browser-b52c0d8be3486e0e2d89a39c521daa5020605ac2.tar.gz packages_apps_Browser-b52c0d8be3486e0e2d89a39c521daa5020605ac2.tar.bz2 |
Merge "Use OriginalUrl instead of Url for history" into honeycomb-mr1
-rw-r--r-- | src/com/android/browser/Controller.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/Tab.java | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index e4b0a0c..9f614b0 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -858,7 +858,7 @@ public class Controller @Override public void onReceivedTitle(Tab tab, final String title) { mUi.onTabDataChanged(tab); - final String pageUrl = tab.getUrl(); + final String pageUrl = tab.getOriginalUrl(); if (TextUtils.isEmpty(pageUrl) || pageUrl.length() >= SQLiteDatabase.SQLITE_MAX_LIKE_PATTERN_LENGTH) { return; @@ -906,7 +906,7 @@ public class Controller public void doUpdateVisitedHistory(Tab tab, boolean isReload) { // Don't save anything in private browsing mode if (tab.isPrivateBrowsingEnabled()) return; - String url = tab.getUrl(); + String url = tab.getOriginalUrl(); if (TextUtils.isEmpty(url) || url.regionMatches(true, 0, "about:", 0, 6)) { diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index c4897f2..47cefbc 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -1583,6 +1583,13 @@ class Tab { return UrlUtils.filteredUrl(mCurrentState.mUrl); } + String getOriginalUrl() { + if (mMainView == null) { + return ""; + } + return UrlUtils.filteredUrl(mMainView.getOriginalUrl()); + } + /** * Get the title of this tab. */ |