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/BrowserConfigBase.java b/src/com/android/browser/BrowserConfigBase.java
index 9dd0bc0..a96e6ad 100644
--- a/src/com/android/browser/BrowserConfigBase.java
+++ b/src/com/android/browser/BrowserConfigBase.java
@@ -90,5 +90,39 @@
             return null;
         }
     }
+
+    public static enum Feature {
+        WAP2ESTORE, /* Launch custom app when URL scheme is 'estore:' */
+        DRM_UPLOADS, /* Prevent uploading files with DRM filename extensions */
+        NETWORK_NOTIFIER, /* Prompt user to select WiFi access point or otherwise enable WLAN */
+        EXIT_DIALOG, /* Add 'Exit' menu item and show 'Minimize or quit' dialog */
+        TITLE_IN_URL_BAR, /* Display page title instead of url in URL bar */
+        CUSTOM_DOWNLOAD_PATH, /* Allow users to provide custom download path */
+        ALLOW_MEDIA_DOWNLOADS, /* Add 'Allow media downloads' menu item */
+        DISABLE_HISTORY /* Allow disabling saving history for non-incognito tabs */
+    }
+
+    public boolean hasFeature(Feature feature) {
+        switch (feature) {
+            case WAP2ESTORE:
+                return mContext.getResources().getBoolean(R.bool.feature_wap2estore);
+            case DRM_UPLOADS:
+                return mContext.getResources().getBoolean(R.bool.feature_drm_uploads);
+            case NETWORK_NOTIFIER:
+                return mContext.getResources().getBoolean(R.bool.feature_network_notifier);
+            case EXIT_DIALOG:
+                return mContext.getResources().getBoolean(R.bool.feature_exit_dialog);
+            case TITLE_IN_URL_BAR:
+                return mContext.getResources().getBoolean(R.bool.feature_title_in_URL_bar);
+            case CUSTOM_DOWNLOAD_PATH:
+                return mContext.getResources().getBoolean(R.bool.feature_custom_download_path);
+            case ALLOW_MEDIA_DOWNLOADS:
+                return mContext.getResources().getBoolean(R.bool.feature_allow_media_downloads);
+            case DISABLE_HISTORY:
+                return mContext.getResources().getBoolean(R.bool.feature_disable_history);
+            default:
+                return false;
+        }
+    }
 }