Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f39b2cfa authored by Ben Murdoch's avatar Ben Murdoch Committed by Steve Block
Browse files

Make autofill a webview preference

Change-Id: I2bed0612ad6381dd4c6aedf4af8740fac33748c7
parent 35dcaece
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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.
     */
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }