Changes Controller to use Tab.getUrl in more places
Bug: 3342456
Changes Controller to use Tab.getUrl() and then added empty
url checks in places like doUpdateVisitedHistory. Tab already takes
care of filtering URLs, so filtering out most visited URLs is thus
handled.
Change-Id: Iaf60353d7cb924991c5e0a5adf18074fcf13bfe6
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 5ef7564..d70b0ef 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -16,7 +16,6 @@
package com.android.browser;
-import com.android.browser.homepages.HomeProvider;
import com.android.common.speech.LoggingEvents;
import android.app.Activity;
@@ -533,7 +532,7 @@
}
// finally update the UI in the activity if it is in the foreground
- mWebViewController.onPageStarted(Tab.this, view, url, favicon);
+ mWebViewController.onPageStarted(Tab.this, view, favicon);
updateBookmarkedStatus();
}
@@ -557,7 +556,7 @@
// but before a provisional load occurred
mCurrentState.mLockIcon = LockIcon.LOCK_ICON_UNSECURE;
}
- mWebViewController.onPageFinished(Tab.this, url);
+ mWebViewController.onPageFinished(Tab.this);
}
// return true if want to hijack the url to let another app to handle it
@@ -688,7 +687,7 @@
@Override
public void doUpdateVisitedHistory(WebView view, String url,
boolean isReload) {
- mWebViewController.doUpdateVisitedHistory(Tab.this, url, isReload);
+ mWebViewController.doUpdateVisitedHistory(Tab.this, isReload);
}
/**
@@ -1569,10 +1568,7 @@
}
String getUrl() {
- if (HomeProvider.MOST_VISITED.equals(mCurrentState.mUrl)) {
- return "";
- }
- return mCurrentState.mUrl;
+ return UrlUtils.filteredUrl(mCurrentState.mUrl);
}
/**