Loading core/java/android/view/ViewGroup.java +8 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.view.inspector.InspectableProperty.EnumEntry; import android.view.translation.TranslationCapability; import android.view.translation.TranslationSpec.DataFormat; import android.view.translation.ViewTranslationRequest; import android.webkit.WebView; import android.window.OnBackInvokedDispatcher; import com.android.internal.R; Loading Loading @@ -3725,6 +3726,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return afm.shouldIncludeAllChildrenViewInAssistStructure(); } private boolean shouldAlwaysIncludeWebview(AutofillManager afm) { if (afm == null) return false; return afm.shouldAlwaysIncludeWebviewInAssistStructure(); } /** @hide */ private void populateChildrenForAutofill(ArrayList<View> list, @AutofillFlags int flags) { final int childrenCount = mChildrenCount; Loading @@ -3741,6 +3747,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager ? mChildren[childIndex] : preorderedList.get(childIndex); if ((flags & AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS) != 0 || child.isImportantForAutofill() || (child instanceof WebView && shouldAlwaysIncludeWebview(afm)) || (child.isMatchingAutofillableHeuristics() && !child.isActivityDeniedForAutofillForUnimportantView()) || (shouldIncludeAllChildrenViewWithAutofillTypeNotNone(afm) Loading core/java/android/view/autofill/AutofillFeatureFlags.java +18 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,17 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_INCLUDE_ALL_VIEWS_IN_ASSIST_STRUCTURE = "include_all_views_in_assist_structure"; /** * Whether to always include WebView in assist structure. WebView is a container view that * providers "virtual" views. We want to always include such a container view since it can * contain arbitrary views in it, some of which could be fillable. * * @hide */ public static final String DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE = "always_include_webview_in_assist_structure"; // END AUTOFILL FOR ALL APPS FLAGS // Loading Loading @@ -441,6 +452,13 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_INCLUDE_ALL_VIEWS_IN_ASSIST_STRUCTURE, false); } /** @hide */ public static boolean shouldAlwaysIncludeWebviewInAssistStructure() { return DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_AUTOFILL, DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE, true); } /** * Whether should enable multi-line filter Loading core/java/android/view/autofill/AutofillManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -728,6 +728,9 @@ public final class AutofillManager { // Indicate whether should include all view in assist structure private boolean mShouldIncludeAllChildrenViewInAssistStructure; // Indicate whether WebView should always be included in the assist structure private boolean mShouldAlwaysIncludeWebviewInAssistStructure; // Indicates whether called the showAutofillDialog() method. private boolean mShowAutofillDialogCalled = false; Loading Loading @@ -946,6 +949,9 @@ public final class AutofillManager { mShouldIncludeAllChildrenViewInAssistStructure = AutofillFeatureFlags.shouldIncludeAllChildrenViewInAssistStructure(); mShouldAlwaysIncludeWebviewInAssistStructure = AutofillFeatureFlags.shouldAlwaysIncludeWebviewInAssistStructure(); } /** Loading Loading @@ -1023,6 +1029,13 @@ public final class AutofillManager { return mShouldIncludeAllChildrenViewInAssistStructure; } /** * @hide */ public boolean shouldAlwaysIncludeWebviewInAssistStructure() { return mShouldAlwaysIncludeWebviewInAssistStructure; } /** * Get the denied or allowed activitiy names under specified package from the list string and * set it in fields accordingly Loading Loading
core/java/android/view/ViewGroup.java +8 −1 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.view.inspector.InspectableProperty.EnumEntry; import android.view.translation.TranslationCapability; import android.view.translation.TranslationSpec.DataFormat; import android.view.translation.ViewTranslationRequest; import android.webkit.WebView; import android.window.OnBackInvokedDispatcher; import com.android.internal.R; Loading Loading @@ -3725,6 +3726,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return afm.shouldIncludeAllChildrenViewInAssistStructure(); } private boolean shouldAlwaysIncludeWebview(AutofillManager afm) { if (afm == null) return false; return afm.shouldAlwaysIncludeWebviewInAssistStructure(); } /** @hide */ private void populateChildrenForAutofill(ArrayList<View> list, @AutofillFlags int flags) { final int childrenCount = mChildrenCount; Loading @@ -3741,6 +3747,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager ? mChildren[childIndex] : preorderedList.get(childIndex); if ((flags & AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS) != 0 || child.isImportantForAutofill() || (child instanceof WebView && shouldAlwaysIncludeWebview(afm)) || (child.isMatchingAutofillableHeuristics() && !child.isActivityDeniedForAutofillForUnimportantView()) || (shouldIncludeAllChildrenViewWithAutofillTypeNotNone(afm) Loading
core/java/android/view/autofill/AutofillFeatureFlags.java +18 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,17 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_INCLUDE_ALL_VIEWS_IN_ASSIST_STRUCTURE = "include_all_views_in_assist_structure"; /** * Whether to always include WebView in assist structure. WebView is a container view that * providers "virtual" views. We want to always include such a container view since it can * contain arbitrary views in it, some of which could be fillable. * * @hide */ public static final String DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE = "always_include_webview_in_assist_structure"; // END AUTOFILL FOR ALL APPS FLAGS // Loading Loading @@ -441,6 +452,13 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_INCLUDE_ALL_VIEWS_IN_ASSIST_STRUCTURE, false); } /** @hide */ public static boolean shouldAlwaysIncludeWebviewInAssistStructure() { return DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_AUTOFILL, DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE, true); } /** * Whether should enable multi-line filter Loading
core/java/android/view/autofill/AutofillManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -728,6 +728,9 @@ public final class AutofillManager { // Indicate whether should include all view in assist structure private boolean mShouldIncludeAllChildrenViewInAssistStructure; // Indicate whether WebView should always be included in the assist structure private boolean mShouldAlwaysIncludeWebviewInAssistStructure; // Indicates whether called the showAutofillDialog() method. private boolean mShowAutofillDialogCalled = false; Loading Loading @@ -946,6 +949,9 @@ public final class AutofillManager { mShouldIncludeAllChildrenViewInAssistStructure = AutofillFeatureFlags.shouldIncludeAllChildrenViewInAssistStructure(); mShouldAlwaysIncludeWebviewInAssistStructure = AutofillFeatureFlags.shouldAlwaysIncludeWebviewInAssistStructure(); } /** Loading Loading @@ -1023,6 +1029,13 @@ public final class AutofillManager { return mShouldIncludeAllChildrenViewInAssistStructure; } /** * @hide */ public boolean shouldAlwaysIncludeWebviewInAssistStructure() { return mShouldAlwaysIncludeWebviewInAssistStructure; } /** * Get the denied or allowed activitiy names under specified package from the list string and * set it in fields accordingly Loading