Skip to content

Commit 219dfa4

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Improve JavaDoc for saved form data
Change-Id: I962df5678081920c30f8a2b1fe79389f702ef3fb
1 parent 53678e9 commit 219dfa4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

core/java/android/webkit/WebView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,8 +1258,10 @@ public void clearCache(boolean includeDiskFiles) {
12581258
}
12591259

12601260
/**
1261-
* Makes sure that clearing the form data removes the adapter from the
1262-
* currently focused textfield if there is one.
1261+
* Removes the autocomplete popup from the currently focused form field, if
1262+
* present. Note this only affects the display of the autocomplete popup,
1263+
* it does not remove any saved form data from this WebView's store. To do
1264+
* that, use {@link WebViewDatabase#clearFormData}.
12631265
*/
12641266
public void clearFormData() {
12651267
checkThread();

core/java/android/webkit/WebViewDatabase.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,19 @@ public void clearHttpAuthUsernamePassword() {
8282
}
8383

8484
/**
85-
* Gets whether there is any previously-entered form data saved.
85+
* Gets whether there is any saved data for web forms.
8686
*
87-
* @return true if there is form data saved
87+
* @return whether there is any saved data for web forms
88+
* @see clearFormData
8889
*/
8990
public boolean hasFormData() {
9091
throw new MustOverrideException();
9192
}
9293

9394
/**
94-
* Clears any stored previously-entered form data.
95+
* Clears any saved data for web forms.
96+
*
97+
* @see hasFormData
9598
*/
9699
public void clearFormData() {
97100
throw new MustOverrideException();

0 commit comments

Comments
 (0)