Bug 1066250 - Part 1: Always show the url in the toolbar on new tablet. r=lucasr

This commit is contained in:
Michael Comella 2014-09-15 08:15:42 -07:00
parent e3b0a150ca
commit 6c46770c0f
2 changed files with 6 additions and 3 deletions

View File

@ -323,7 +323,7 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
}
// If the pref to show the URL isn't set, just use the tab's display title.
if (!mPrefs.shouldShowUrl() || url == null) {
if (!mPrefs.shouldShowUrl(mActivity) || url == null) {
setTitle(tab.getDisplayTitle());
return;
}

View File

@ -5,11 +5,14 @@
package org.mozilla.gecko.toolbar;
import org.mozilla.gecko.NewTabletUI;
import org.mozilla.gecko.PrefsHelper;
import org.mozilla.gecko.Tab;
import org.mozilla.gecko.Tabs;
import org.mozilla.gecko.util.ThreadUtils;
import android.content.Context;
class ToolbarPrefs {
private static final String PREF_AUTOCOMPLETE_ENABLED = "browser.urlbar.autocomplete.enabled";
private static final String PREF_TITLEBAR_MODE = "browser.chrome.titlebarMode";
@ -40,8 +43,8 @@ class ToolbarPrefs {
return enableAutocomplete;
}
boolean shouldShowUrl() {
return showUrl;
boolean shouldShowUrl(final Context context) {
return showUrl || NewTabletUI.isEnabled(context);
}
boolean shouldTrimUrls() {