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

Commit b1b82a8d authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Set the unique id of the AutoFill profile WebKit can read it

After the recent Chromium merge to 7.0.540.0, it seems that we are no
longer allowed to use a profile unique id of 0. Set the unique id
in the AutoFillProfile class so that WebKit can access it.

Change-Id: I88cd1e91b8c6043c732a1709a89fda4a3c9f921f
parent 5ff9980a
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ public class WebSettings {
     * @hide for now, pending API council approval.
     */
    public static class AutoFillProfile {
        private int mUniqueId;
        private String mFullName;
        private String mEmailAddress;
        private String mCompanyName;
@@ -234,10 +235,11 @@ public class WebSettings {
        private String mCountry;
        private String mPhoneNumber;

        public AutoFillProfile(String fullName, String email,
        public AutoFillProfile(int uniqueId, String fullName, String email,
                String companyName, String addressLine1, String addressLine2,
                String city, String state, String zipCode, String country,
                String phoneNumber) {
            mUniqueId = uniqueId;
            mFullName = fullName;
            mEmailAddress = email;
            mCompanyName = companyName;
@@ -250,6 +252,7 @@ public class WebSettings {
            mPhoneNumber = phoneNumber;
        }

        public int getUniqueId() { return mUniqueId; }
        public String getFullName() { return mFullName; }
        public String getEmailAddress() { return mEmailAddress; }
        public String getCompanyName() { return mCompanyName; }
@@ -1613,9 +1616,11 @@ public class WebSettings {
     * @hide
     */
    public synchronized void setAutoFillProfile(AutoFillProfile profile) {
        if (mAutoFillProfile != profile) {
            mAutoFillProfile = profile;
            postSync();
        }
    }

    int getDoubleTapToastCount() {
        return mDoubleTapToastCount;