diff options
| author | Ben Murdoch <benm@google.com> | 2010-10-13 04:47:21 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-13 04:47:21 -0700 |
| commit | ff4031bcb5c387900acf63b46211ba00fa52d417 (patch) | |
| tree | 3a19822103f5e7df0fbf29cbbbd29c45e44d82f1 | |
| parent | 7db7c5d60c0826c5781756ce75548b4a5bc0a3c5 (diff) | |
| parent | e9e3ccd10db7d4793ae046a751f68791da0e6edb (diff) | |
| download | frameworks_base-ff4031bcb5c387900acf63b46211ba00fa52d417.zip frameworks_base-ff4031bcb5c387900acf63b46211ba00fa52d417.tar.gz frameworks_base-ff4031bcb5c387900acf63b46211ba00fa52d417.tar.bz2 | |
Merge "Sync autofill profile data to native WebKit"
| -rw-r--r-- | core/java/android/webkit/WebSettings.java | 65 |
1 files changed, 51 insertions, 14 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 7b9af5b..c42c601 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -219,6 +219,32 @@ public class WebSettings { private boolean mLoadWithOverviewMode = false; private boolean mEnableSmoothTransition = false; + // AutoFill Profile data + /** + * @hide for now, pending API council approval. + */ + public static class AutoFillProfile { + private String mFullName; + private String mEmailAddress; + + public AutoFillProfile() { + } + + public AutoFillProfile(String fullName, String email) { + mFullName = fullName; + mEmailAddress = email; + } + + public void setFullName(String fullName) { mFullName = fullName; } + public void setEmailAddress(String emailAddress) { mEmailAddress = emailAddress; } + + public String getFullName() { return mFullName; } + public String getEmailAddress() { return mEmailAddress; } + } + + + private AutoFillProfile mAutoFillProfile; + // private WebSettings, not accessible by the host activity static private int mDoubleTapToastCount = 3; @@ -597,20 +623,6 @@ public class WebSettings { } /** - * @hide - */ - public void setAutoFillEnabled(boolean enabled) { - mAutoFillEnabled = enabled; - } - - /** - * @hide - */ - public boolean getAutoFillEnabled() { - return mAutoFillEnabled; - } - - /** * Store whether the WebView is saving password. */ public void setSavePassword(boolean save) { @@ -1568,6 +1580,31 @@ public class WebSettings { } } + /** + * @hide + */ + public synchronized void setAutoFillEnabled(boolean enabled) { + if (mAutoFillEnabled != enabled) { + mAutoFillEnabled = enabled; + postSync(); + } + } + + /** + * @hide + */ + public synchronized boolean getAutoFillEnabled() { + return mAutoFillEnabled; + } + + /** + * @hide + */ + public synchronized void setAutoFillProfile(AutoFillProfile profile) { + mAutoFillProfile = profile; + postSync(); + } + int getDoubleTapToastCount() { return mDoubleTapToastCount; } |
