summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2010-12-05 11:35:20 -0800
committerMichael Kolb <kolby@google.com>2010-12-06 15:24:43 -0800
commit41d3b94fdb805dec53a3103e3db7b427834097d0 (patch)
tree079533781f062957cab9dbb2da233f6b65cd8a7a
parent5eb850d10e4d5109f3a65cabc2b17675f2828e04 (diff)
downloadpackages_apps_Browser-41d3b94fdb805dec53a3103e3db7b427834097d0.zip
packages_apps_Browser-41d3b94fdb805dec53a3103e3db7b427834097d0.tar.gz
packages_apps_Browser-41d3b94fdb805dec53a3103e3db7b427834097d0.tar.bz2
cleaned up resetTitleAndIcon
eliminate unnecessary tab lookup Change-Id: I4d7f04fb13e5c5a5c5405b58c0853de8c0da44c8
-rw-r--r--src/com/android/browser/BaseUi.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index c4f3bd5..6ae6f1b 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -694,7 +694,7 @@ public class BaseUi implements UI, WebViewFactory {
if (current == null) {
return;
}
- resetTitleAndIcon(current);
+ resetTitleAndIcon(tab, current);
int progress = current.getProgress();
current.getWebChromeClient().onProgressChanged(current, progress);
}
@@ -703,14 +703,13 @@ public class BaseUi implements UI, WebViewFactory {
public void resetTitleAndIcon(Tab tab) {
WebView current = tab.getWebView();
if (current != null) {
- resetTitleAndIcon(current);
+ resetTitleAndIcon(tab, current);
}
}
// Reset the title and the icon based on the given item.
- private void resetTitleAndIcon(WebView view) {
+ private void resetTitleAndIcon(Tab tab, WebView view) {
WebHistoryItem item = view.copyBackForwardList().getCurrentItem();
- Tab tab = mTabControl.getTabFromView(view);
if (item != null) {
setUrlTitle(tab, item.getUrl(), item.getTitle());
setFavicon(tab, item.getFavicon());