Loading core/java/android/service/autofill/AutofillService.java +14 −1 Original line number Diff line number Diff line Loading @@ -438,8 +438,21 @@ import com.android.internal.os.SomeArgs; * AutofillValue password = passwordNode.getAutofillValue().getTextValue().toString(); * * save(username, password); * * </pre> * * * <a name="Privacy"></a> * <h3>Privacy</h3> * * <p>The {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback)} method is called * without the user content. The Android system strips some properties of the * {@link android.app.assist.AssistStructure.ViewNode view nodes} passed to these calls, but not all * of them. For example, the data provided in the {@link android.view.ViewStructure.HtmlInfo} * objects set by {@link android.webkit.WebView} is never stripped out. * * <p>Because this data could contain PII (Personally Identifiable Information, such as username or * email address), the service should only use it locally (i.e., in the app's process) for * heuristics purposes, but it should not be sent to external servers. */ public abstract class AutofillService extends Service { private static final String TAG = "AutofillService"; Loading core/java/android/webkit/WebView.java +4 −0 Original line number Diff line number Diff line Loading @@ -2758,7 +2758,9 @@ public class WebView extends AbsoluteLayout * <p>For example, an HTML form with 2 fields for username and password: * * <pre class="prettyprint"> * <label>Username:</label> * <input type="text" name="username" id="user" value="Type your username" autocomplete="username" placeholder="Email or username"> * <label>Password:</label> * <input type="password" name="password" id="pass" autocomplete="current-password" placeholder="Password"> * </pre> * Loading @@ -2772,6 +2774,7 @@ public class WebView extends AbsoluteLayout * username.setHtmlInfo(username.newHtmlInfoBuilder("input") * .addAttribute("type", "text") * .addAttribute("name", "username") * .addAttribute("label", "Username:") * .build()); * username.setHint("Email or username"); * username.setAutofillType(View.AUTOFILL_TYPE_TEXT); Loading @@ -2785,6 +2788,7 @@ public class WebView extends AbsoluteLayout * password.setHtmlInfo(password.newHtmlInfoBuilder("input") * .addAttribute("type", "password") * .addAttribute("name", "password") * .addAttribute("label", "Password:") * .build()); * password.setHint("Password"); * password.setAutofillType(View.AUTOFILL_TYPE_TEXT); Loading Loading
core/java/android/service/autofill/AutofillService.java +14 −1 Original line number Diff line number Diff line Loading @@ -438,8 +438,21 @@ import com.android.internal.os.SomeArgs; * AutofillValue password = passwordNode.getAutofillValue().getTextValue().toString(); * * save(username, password); * * </pre> * * * <a name="Privacy"></a> * <h3>Privacy</h3> * * <p>The {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback)} method is called * without the user content. The Android system strips some properties of the * {@link android.app.assist.AssistStructure.ViewNode view nodes} passed to these calls, but not all * of them. For example, the data provided in the {@link android.view.ViewStructure.HtmlInfo} * objects set by {@link android.webkit.WebView} is never stripped out. * * <p>Because this data could contain PII (Personally Identifiable Information, such as username or * email address), the service should only use it locally (i.e., in the app's process) for * heuristics purposes, but it should not be sent to external servers. */ public abstract class AutofillService extends Service { private static final String TAG = "AutofillService"; Loading
core/java/android/webkit/WebView.java +4 −0 Original line number Diff line number Diff line Loading @@ -2758,7 +2758,9 @@ public class WebView extends AbsoluteLayout * <p>For example, an HTML form with 2 fields for username and password: * * <pre class="prettyprint"> * <label>Username:</label> * <input type="text" name="username" id="user" value="Type your username" autocomplete="username" placeholder="Email or username"> * <label>Password:</label> * <input type="password" name="password" id="pass" autocomplete="current-password" placeholder="Password"> * </pre> * Loading @@ -2772,6 +2774,7 @@ public class WebView extends AbsoluteLayout * username.setHtmlInfo(username.newHtmlInfoBuilder("input") * .addAttribute("type", "text") * .addAttribute("name", "username") * .addAttribute("label", "Username:") * .build()); * username.setHint("Email or username"); * username.setAutofillType(View.AUTOFILL_TYPE_TEXT); Loading @@ -2785,6 +2788,7 @@ public class WebView extends AbsoluteLayout * password.setHtmlInfo(password.newHtmlInfoBuilder("input") * .addAttribute("type", "password") * .addAttribute("name", "password") * .addAttribute("label", "Password:") * .build()); * password.setHint("Password"); * password.setAutofillType(View.AUTOFILL_TYPE_TEXT); Loading