Merge "Implemented WebView.isVisibleToUserForAutofill()" into pi-dev
diff --git a/api/system-current.txt b/api/system-current.txt
index ec7af51..fffbcd8 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6674,6 +6674,7 @@
method public abstract android.view.View findFocus(android.view.View);
method public abstract android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider();
method public abstract android.os.Handler getHandler(android.os.Handler);
+ method public default boolean isVisibleToUserForAutofill(int);
method public abstract void onActivityResult(int, int, android.content.Intent);
method public abstract void onAttachedToWindow();
method public default boolean onCheckIsTextEditor();
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 5d3f1c9..f39b73e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2906,6 +2906,11 @@
mProvider.getViewDelegate().autofill(values);
}
+ @Override
+ public boolean isVisibleToUserForAutofill(int virtualId) {
+ return mProvider.getViewDelegate().isVisibleToUserForAutofill(virtualId);
+ }
+
/** @hide */
@Override
public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
diff --git a/core/java/android/webkit/WebViewProvider.java b/core/java/android/webkit/WebViewProvider.java
index a474a85..00e782b 100644
--- a/core/java/android/webkit/WebViewProvider.java
+++ b/core/java/android/webkit/WebViewProvider.java
@@ -329,13 +329,16 @@
public void onProvideVirtualStructure(android.view.ViewStructure structure);
- @SuppressWarnings("unused")
- public default void onProvideAutofillVirtualStructure(android.view.ViewStructure structure,
- int flags) {
+ default void onProvideAutofillVirtualStructure(
+ @SuppressWarnings("unused") android.view.ViewStructure structure,
+ @SuppressWarnings("unused") int flags) {
}
- @SuppressWarnings("unused")
- public default void autofill(SparseArray<AutofillValue>values) {
+ default void autofill(@SuppressWarnings("unused") SparseArray<AutofillValue> values) {
+ }
+
+ default boolean isVisibleToUserForAutofill(@SuppressWarnings("unused") int virtualId) {
+ return true; // true is the default value returned by View.isVisibleToUserForAutofill()
}
public AccessibilityNodeProvider getAccessibilityNodeProvider();