diff options
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | res/xml/browser_preferences.xml | 6 | ||||
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 3ceec67..65f555c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -374,6 +374,10 @@ <string name="pref_security_save_form_data">Remember form data</string> <!-- Settings summary --> <string name="pref_security_save_form_data_summary">Remember data I type in forms for later use</string> + <!-- Settings label for enabling/disabling the form AutoFill feature --> + <string name="pref_autoFill_enabled">AutoFill forms</string> + <!-- Settings summary for the form AutoFill feature. --> + <string name="pref_autoFill_enabled_summary">Automatically fill out forms where possible</string> <!-- Settings label --> <string name="pref_security_show_security_warning">Show security warnings</string> <!-- Settings summmary --> diff --git a/res/xml/browser_preferences.xml b/res/xml/browser_preferences.xml index 1da85ec..cc9b18a 100644 --- a/res/xml/browser_preferences.xml +++ b/res/xml/browser_preferences.xml @@ -139,6 +139,12 @@ android:title="@string/pref_security_save_form_data" android:summary="@string/pref_security_save_form_data_summary" /> + <CheckBoxPreference + android:key="autoFill_enabled" + android:defaultValue="false" + android:title="@string/pref_autoFill_enabled" + android:summary="@string/pref_autoFill_enabled_summary" /> + <com.android.browser.BrowserYesNoPreference android:key="privacy_clear_form_data" android:title="@string/pref_privacy_clear_form_data" diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index cb4918b..c733e17 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -77,6 +77,7 @@ class BrowserSettings extends Observable { private boolean showSecurityWarnings; private boolean rememberPasswords; private boolean saveFormData; + private boolean autoFillEnabled; private boolean openInBackground; private String defaultTextEncodingName; private String homeUrl = ""; @@ -226,6 +227,7 @@ class BrowserSettings extends Observable { s.setDefaultZoom(b.zoomDensity); s.setLightTouchEnabled(b.lightTouch); s.setSaveFormData(b.saveFormData); + s.setAutoFillEnabled(b.autoFillEnabled); s.setSavePassword(b.rememberPasswords); s.setLoadWithOverviewMode(b.loadsPageInOverviewMode); s.setPageCacheCapacity(pageCacheCapacity); @@ -340,6 +342,7 @@ class BrowserSettings extends Observable { rememberPasswords); saveFormData = p.getBoolean("save_formdata", saveFormData); + autoFillEnabled = p.getBoolean("autoFill_enabled", autoFillEnabled); boolean accept_cookies = p.getBoolean("accept_cookies", CookieManager.getInstance().acceptCookie()); CookieManager.getInstance().setAcceptCookie(accept_cookies); @@ -647,6 +650,7 @@ class BrowserSettings extends Observable { showSecurityWarnings = true; rememberPasswords = true; saveFormData = true; + autoFillEnabled = false; openInBackground = false; autoFitPage = true; landscapeOnly = false; |