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/res/menu/browser.xml b/res/menu/browser.xml
index 67915fe..af57357 100644
--- a/res/menu/browser.xml
+++ b/res/menu/browser.xml
@@ -102,15 +102,10 @@
android:id="@+id/preferences_menu_id"
android:title="@string/menu_preferences"
android:alphabeticShortcut="p" />
-
- <group
- android:id="@+id/QRD_MENU"
- android:visible="false">
- <item
- android:id="@+id/exit_menu_id"
- android:title="@string/exit" />
- </group>
-
+ <item
+ android:id="@+id/exit_menu_id"
+ android:visible="@bool/feature_exit_dialog"
+ android:title="@string/exit" />
<item
android:id="@+id/about_menu_id"
android:title="@string/about" />
diff --git a/res/values/bools.xml b/res/values/bools.xml
index 1764ea0..fe9086e 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+ Copyright (c) 2014, The Linux Foundation. All rights reserved.
Copyright (C) 2011 The Android Open Source Project Licensed under the
Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the
@@ -23,10 +24,28 @@
<!-- Browser menu toggles -->
<bool name="menu_show_navigation">true</bool>
<bool name="menu_show_bookmarks">true</bool>
- <!-- Carrier Specific Values -->
- <bool name="wap2estore">false</bool>
- <bool name="drm_uploads">false</bool>
- <bool name="network_notifier">false</bool>
- <bool name="def_disable_history">false</bool>
- <bool name="def_enable_media_downloads">false</bool>
+
+
+ <!-- Switches for carrier specific features -->
+
+ <!-- Launch custom app when URL scheme is 'estore:' -->
+ <bool name="feature_wap2estore">false</bool>
+ <!-- Prevent uploading files with DRM filename extensions -->
+ <bool name="feature_drm_uploads">false</bool>
+ <!-- Prompt user to select WiFi access point or otherwise enable WLAN -->
+ <bool name="feature_network_notifier">false</bool>
+ <!-- Add 'Exit' menu item and show 'Minimize or quit' dialog -->
+ <bool name="feature_exit_dialog">false</bool>
+ <!-- Display page title instead of url in URL bar -->
+ <bool name="feature_title_in_URL_bar">false</bool>
+ <!-- Allow users to provide custom download path -->
+ <bool name="feature_custom_download_path">false</bool>
+ <!-- Add 'Allow media downloads' menu item -->
+ <bool name="feature_allow_media_downloads">false</bool>
+ <!-- Allow disabling saving history for non-incognito tabs -->
+ <bool name="feature_disable_history">false</bool>
+
+ <!-- Default values for carrier specific features -->
+ <bool name="def_allow_media_downloads">false</bool>
+
</resources>
diff --git a/res/xml/general_preferences.xml b/res/xml/general_preferences.xml
index 7c21b3a..361afde 100644
--- a/res/xml/general_preferences.xml
+++ b/res/xml/general_preferences.xml
@@ -142,7 +142,8 @@
android:title="@string/pref_accessibility_title" />
- <PreferenceScreen android:title="@string/pref_content_title">
+ <PreferenceScreen android:title="@string/pref_content_title"
+ android:key="content_settings">
<CheckBoxPreference
android:defaultValue="true"
android:key="block_popup_windows"