Make autofill a webview preference
Change-Id: I2bed0612ad6381dd4c6aedf4af8740fac33748c7
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user