Add more switches to enable/disable carrier features
Add bools to enable/disable the following carrier specific features:
- Exit menu item with 'Minimize or quit' dialog
- Display page title instead of URL in URL bar
- Allow users to provide custom download path
Add method to detect if a carrier specific feature is enabled.
Change-Id: I9db1b16afd14e476de474e8c86bd60ba1a450aba
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java
index e73f218..b07f035 100644
--- a/src/com/android/browser/NavigationBarPhone.java
+++ b/src/com/android/browser/NavigationBarPhone.java
@@ -145,7 +145,9 @@
if (!isEditingUrl()) {
// add for carrier requirement - show title from native instead of url
Tab currentTab = mUiController.getTabControl().getCurrentTab();
- if (currentTab != null && currentTab.getTitle() != null) {
+ if (BrowserConfig.getInstance(getContext())
+ .hasFeature(BrowserConfig.Feature.TITLE_IN_URL_BAR) &&
+ currentTab != null && currentTab.getTitle() != null) {
mUrlInput.setText(currentTab.getTitle(), false);
} else if (title == null) {
mUrlInput.setText(R.string.new_tab);