Loading core/java/android/view/ViewGroup.java +6 −1 Original line number Diff line number Diff line Loading @@ -3732,6 +3732,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return afm.shouldAlwaysIncludeWebviewInAssistStructure(); } private boolean shouldIncludeInvisibleView(AutofillManager afm) { if (afm == null) return false; return afm.shouldIncludeInvisibleViewInAssistStructure(); } /** @hide */ private void populateChildrenForAutofill(ArrayList<View> list, @AutofillFlags int flags) { final int childrenCount = mChildrenCount; Loading @@ -3754,7 +3759,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager || (shouldIncludeAllChildrenViewWithAutofillTypeNotNone(afm) && child.getAutofillType() != AUTOFILL_TYPE_NONE) || shouldIncludeAllChildrenViews(afm) || (Flags.includeInvisibleViewGroupInAssistStructure() || (shouldIncludeInvisibleView(afm) && child instanceof ViewGroup && child.getVisibility() != View.VISIBLE)) { // If the child is a ViewGroup object and its visibility is not visible, include // it as part of the assist structure. The children of these invisible ViewGroup Loading core/java/android/view/autofill/AutofillFeatureFlags.java +20 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,19 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE = "always_include_webview_in_assist_structure"; /** * Whether to include invisible views in the assist structure. Including invisible views can fix * some cases in which Session is destroyed earlier than it is suppose to. * * <p>See * frameworks/base/services/autofill/bugfixes.aconfig#include_invisible_view_group_in_assist_structure * for more information. * * @hide */ public static final String DEVICE_CONFIG_INCLUDE_INVISIBLE_VIEW_GROUP_IN_ASSIST_STRUCTURE = "include_invisible_view_group_in_assist_structure"; // END AUTOFILL FOR ALL APPS FLAGS // Loading Loading @@ -473,6 +486,13 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE, true); } /** @hide */ public static boolean shouldIncludeInvisibleViewInAssistStructure() { return DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_AUTOFILL, DEVICE_CONFIG_INCLUDE_INVISIBLE_VIEW_GROUP_IN_ASSIST_STRUCTURE, false); } /** * 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 @@ -739,6 +739,9 @@ public final class AutofillManager { // Indicate whether WebView should always be included in the assist structure private boolean mShouldAlwaysIncludeWebviewInAssistStructure; // Indicate whether invisibles views should be included in the assist structure private boolean mShouldIncludeInvisibleViewInAssistStructure; // Controls logic around apps changing some properties of their views when activity loses // focus due to autofill showing biometric activity, password manager, or password breach check. private boolean mRelayoutFix; Loading Loading @@ -968,6 +971,9 @@ public final class AutofillManager { mShouldAlwaysIncludeWebviewInAssistStructure = AutofillFeatureFlags.shouldAlwaysIncludeWebviewInAssistStructure(); mShouldIncludeInvisibleViewInAssistStructure = AutofillFeatureFlags.shouldIncludeInvisibleViewInAssistStructure(); mRelayoutFix = Flags.relayout(); mIsCredmanIntegrationEnabled = Flags.autofillCredmanIntegration(); } Loading Loading @@ -1054,6 +1060,13 @@ public final class AutofillManager { return mShouldAlwaysIncludeWebviewInAssistStructure; } /** * @hide */ public boolean shouldIncludeInvisibleViewInAssistStructure() { return mShouldIncludeInvisibleViewInAssistStructure; } /** * 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 +6 −1 Original line number Diff line number Diff line Loading @@ -3732,6 +3732,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return afm.shouldAlwaysIncludeWebviewInAssistStructure(); } private boolean shouldIncludeInvisibleView(AutofillManager afm) { if (afm == null) return false; return afm.shouldIncludeInvisibleViewInAssistStructure(); } /** @hide */ private void populateChildrenForAutofill(ArrayList<View> list, @AutofillFlags int flags) { final int childrenCount = mChildrenCount; Loading @@ -3754,7 +3759,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager || (shouldIncludeAllChildrenViewWithAutofillTypeNotNone(afm) && child.getAutofillType() != AUTOFILL_TYPE_NONE) || shouldIncludeAllChildrenViews(afm) || (Flags.includeInvisibleViewGroupInAssistStructure() || (shouldIncludeInvisibleView(afm) && child instanceof ViewGroup && child.getVisibility() != View.VISIBLE)) { // If the child is a ViewGroup object and its visibility is not visible, include // it as part of the assist structure. The children of these invisible ViewGroup Loading
core/java/android/view/autofill/AutofillFeatureFlags.java +20 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,19 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE = "always_include_webview_in_assist_structure"; /** * Whether to include invisible views in the assist structure. Including invisible views can fix * some cases in which Session is destroyed earlier than it is suppose to. * * <p>See * frameworks/base/services/autofill/bugfixes.aconfig#include_invisible_view_group_in_assist_structure * for more information. * * @hide */ public static final String DEVICE_CONFIG_INCLUDE_INVISIBLE_VIEW_GROUP_IN_ASSIST_STRUCTURE = "include_invisible_view_group_in_assist_structure"; // END AUTOFILL FOR ALL APPS FLAGS // Loading Loading @@ -473,6 +486,13 @@ public class AutofillFeatureFlags { DEVICE_CONFIG_ALWAYS_INCLUDE_WEBVIEW_IN_ASSIST_STRUCTURE, true); } /** @hide */ public static boolean shouldIncludeInvisibleViewInAssistStructure() { return DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_AUTOFILL, DEVICE_CONFIG_INCLUDE_INVISIBLE_VIEW_GROUP_IN_ASSIST_STRUCTURE, false); } /** * 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 @@ -739,6 +739,9 @@ public final class AutofillManager { // Indicate whether WebView should always be included in the assist structure private boolean mShouldAlwaysIncludeWebviewInAssistStructure; // Indicate whether invisibles views should be included in the assist structure private boolean mShouldIncludeInvisibleViewInAssistStructure; // Controls logic around apps changing some properties of their views when activity loses // focus due to autofill showing biometric activity, password manager, or password breach check. private boolean mRelayoutFix; Loading Loading @@ -968,6 +971,9 @@ public final class AutofillManager { mShouldAlwaysIncludeWebviewInAssistStructure = AutofillFeatureFlags.shouldAlwaysIncludeWebviewInAssistStructure(); mShouldIncludeInvisibleViewInAssistStructure = AutofillFeatureFlags.shouldIncludeInvisibleViewInAssistStructure(); mRelayoutFix = Flags.relayout(); mIsCredmanIntegrationEnabled = Flags.autofillCredmanIntegration(); } Loading Loading @@ -1054,6 +1060,13 @@ public final class AutofillManager { return mShouldAlwaysIncludeWebviewInAssistStructure; } /** * @hide */ public boolean shouldIncludeInvisibleViewInAssistStructure() { return mShouldIncludeInvisibleViewInAssistStructure; } /** * Get the denied or allowed activitiy names under specified package from the list string and * set it in fields accordingly Loading