Add enable plug-ins to UI. Remove pluginsPath from BrowserSettings as it is unused now.
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b88f124..7f8623f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -302,6 +302,8 @@
<string name="pref_content_javascript">Enable JavaScript</string>
<!-- Settings label -->
<string name="pref_content_open_in_background">Open in background</string>
+ <!-- Settings label -->
+ <string name="pref_content_plugins">Enable plug-ins</string>
<!-- Settings summary -->
<string name="pref_content_open_in_background_summary">Open new windows behind the current one</string>
<!-- Settings label -->
diff --git a/res/xml/browser_preferences.xml b/res/xml/browser_preferences.xml
index 0df35c2..1845e20 100644
--- a/res/xml/browser_preferences.xml
+++ b/res/xml/browser_preferences.xml
@@ -77,7 +77,12 @@
android:key="enable_javascript"
android:defaultValue="true"
android:title="@string/pref_content_javascript" />
-
+
+ <CheckBoxPreference
+ android:key="enable_plugins"
+ android:defaultValue="true"
+ android:title="@string/pref_content_plugins" />
+
<CheckBoxPreference
android:key="open_in_background"
android:defaultValue="false"
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index cb51b50..e36d54b 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -64,7 +64,6 @@
private boolean loadsImagesAutomatically = true;
private boolean javaScriptEnabled = true;
private boolean pluginsEnabled = true;
- private String pluginsPath; // default value set in loadFromDb().
private boolean javaScriptCanOpenWindowsAutomatically = false;
private boolean showSecurityWarnings = true;
private boolean rememberPasswords = true;
@@ -242,10 +241,6 @@
public void loadFromDb(Context ctx) {
SharedPreferences p =
PreferenceManager.getDefaultSharedPreferences(ctx);
-
- // Set the default value for the plugins path to the application's
- // local directory.
- pluginsPath = ctx.getDir("plugins", 0).getPath();
// Set the default value for the Application Caches path.
appCachePath = ctx.getDir("appcache", 0).getPath();
// Determine the maximum size of the application cache.
@@ -279,7 +274,6 @@
javaScriptEnabled);
pluginsEnabled = p.getBoolean("enable_plugins",
pluginsEnabled);
- pluginsPath = p.getString("plugins_path", pluginsPath);
javaScriptCanOpenWindowsAutomatically = !p.getBoolean(
"block_popup_windows",
!javaScriptCanOpenWindowsAutomatically);
@@ -368,10 +362,6 @@
update();
}
- public String getPluginsPath() {
- return pluginsPath;
- }
-
public String getHomePage() {
return homeUrl;
}