Make autofill a webview preference

Change-Id: I2bed0612ad6381dd4c6aedf4af8740fac33748c7
This commit is contained in:
Ben Murdoch
2010-09-09 10:26:46 +01:00
committed by Steve Block
parent 35dcaece11
commit f39b2cfadb
2 changed files with 17 additions and 1 deletions

View File

@@ -207,6 +207,7 @@ public class WebSettings {
private RenderPriority mRenderPriority = RenderPriority.NORMAL;
private int mOverrideCacheMode = LOAD_DEFAULT;
private boolean mSaveFormData = true;
private boolean mAutoFillEnabled = false;
private boolean mSavePassword = true;
private boolean mLightTouchEnabled = false;
private boolean mNeedInitialFocus = true;
@@ -595,6 +596,20 @@ public class WebSettings {
return mSaveFormData;
}
/**
* @hide
*/
public void setAutoFillEnabled(boolean enabled) {
mAutoFillEnabled = enabled;
}
/**
* @hide
*/
public boolean getAutoFillEnabled() {
return mAutoFillEnabled;
}
/**
* Store whether the WebView is saving password.
*/

View File

@@ -137,7 +137,8 @@ import java.util.ArrayList;
}
public void setAutoFillable(int queryId) {
mAutoFillable = (queryId != FORM_NOT_AUTOFILLABLE);
mAutoFillable = mWebView.getSettings().getAutoFillEnabled()
&& (queryId != FORM_NOT_AUTOFILLABLE);
mQueryId = queryId;
}