Skip to content

Commit 32fe410

Browse files
author
Steve Block
committed
Improve JavaDoc for saved username/password pairs
Change-Id: Ief079666eb1250f0a57089c778669b638a259194
1 parent e09e976 commit 32fe410

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

core/java/android/webkit/WebView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,16 @@ public void setCertificate(SslCertificate certificate) {
582582
//-------------------------------------------------------------------------
583583

584584
/**
585-
* Saves the username and password for a particular host in this WebView's
586-
* internal database.
585+
* Sets a username and password pair for the specified host. This data is
586+
* used by the Webview to autocomplete username and password fields in web
587+
* forms. Note that this is unrelated to the credentials used for HTTP
588+
* authentication.
587589
*
588590
* @param host the host that required the credentials
589591
* @param username the username for the given host
590592
* @param password the password for the given host
593+
* @see WebViewDatabase#clearUsernamePassword
594+
* @see WebViewDatabase#hasUsernamePassword
591595
*/
592596
public void savePassword(String host, String username, String password) {
593597
checkThread();

core/java/android/webkit/WebViewDatabase.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* application has stored any of the following types of browsing data and
2424
* to clear any such stored data for all WebViews in the application.
2525
* <ul>
26-
* <li>Username/password pairs entered into web forms</li>
26+
* <li>Username/password pairs for web forms</li>
2727
* <li>HTTP authentication username/password pairs</li>
2828
* <li>Data entered into text fields (e.g. for autocomplete suggestions)</li>
2929
* </ul>
@@ -43,18 +43,23 @@ public static synchronized WebViewDatabase getInstance(Context context) {
4343
}
4444

4545
/**
46-
* Gets whether there are any username/password combinations
47-
* from web pages saved.
46+
* Gets whether there are any saved username/password pairs for web forms.
47+
* Note that these are unrelated to HTTP authentication credentials.
4848
*
49-
* @return true if there are any username/passwords used in web
50-
* forms saved
49+
* @return true if there are any saved username/password pairs
50+
* @see WebView#savePassword
51+
* @see clearUsernamePassword
5152
*/
5253
public boolean hasUsernamePassword() {
5354
throw new MustOverrideException();
5455
}
5556

5657
/**
57-
* Clears any username/password combinations saved from web forms.
58+
* Clears any saved username/password pairs for web forms.
59+
* Note that these are unrelated to HTTP authentication credentials.
60+
*
61+
* @see WebView#savePassword
62+
* @see hasUsernamePassword
5863
*/
5964
public void clearUsernamePassword() {
6065
throw new MustOverrideException();

0 commit comments

Comments
 (0)