Change homepage setting handling
Bug: 3247095
Tweaks the setting of the homepage setting. Replaces the "set to..."
dialog with 2 buttons, and user can now enter a blank url to get a
blank page with title "New Tab".
Change-Id: I95bcfcd241db4b9efbde645100d2fd44c980e061
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 79c3327..f5851df 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -245,15 +245,14 @@
@Override
public void onPageStarted(Tab tab, String url, Bitmap favicon) {
- if (mXLargeScreenSize) {
- mTabBar.onPageStarted(tab, url, favicon);
- }
if (tab.inForeground()) {
resetLockIcon(tab, url);
setUrlTitle(tab, url, null);
setFavicon(tab, favicon);
}
-
+ if (mXLargeScreenSize) {
+ mTabBar.onPageStarted(tab, url, favicon);
+ }
}
@Override
@@ -706,7 +705,7 @@
setUrlTitle(tab, item.getUrl(), item.getTitle());
setFavicon(tab, item.getFavicon());
} else {
- setUrlTitle(tab, null, null);
+ setUrlTitle(tab, null, mActivity.getString(R.string.new_tab));
setFavicon(tab, null);
}
}
@@ -850,12 +849,7 @@
@Override
public void setUrlTitle(Tab tab, String url, String title) {
if (TextUtils.isEmpty(title)) {
- if (TextUtils.isEmpty(url)) {
- title = mActivity.getResources()
- .getString(R.string.title_bar_loading);
- } else {
- title = url;
- }
+ title = url;
}
if (tab.isInVoiceSearchMode()) return;
if (tab.inForeground()) {