Loading core/java/android/view/View.java +11 −7 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ import android.view.accessibility.AccessibilityWindowInfo; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; import android.view.autofill.AutofillFeatureFlags; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; import android.view.autofill.AutofillValue; Loading Loading @@ -10363,15 +10362,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private boolean isAutofillable() { if (getAutofillType() == AUTOFILL_TYPE_NONE) return false; final AutofillManager afm = getAutofillManager(); if (afm == null) { return false; } // Disable triggering autofill if the view is integrated with CredentialManager. if (AutofillFeatureFlags.shouldIgnoreCredentialViews() && isCredential()) return false; if (afm.shouldIgnoreCredentialViews() && isCredential()) { return false; } if (!isImportantForAutofill()) { // If view matches heuristics and is not denied, it will be treated same as view that's // important for autofill if (isMatchingAutofillableHeuristics() && !isActivityDeniedForAutofillForUnimportantView()) { if (afm.isMatchingAutofillableHeuristics(this) && !afm.isActivityDeniedForAutofillForUnimportantView()) { return getAutofillViewId() > LAST_APP_AUTOFILL_ID; } // View is not important for "regular" autofill, so we must check if Augmented Autofill Loading @@ -10380,8 +10385,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (options == null || !options.isAugmentedAutofillEnabled(mContext)) { return false; } final AutofillManager afm = getAutofillManager(); if (afm == null) return false; afm.notifyViewEnteredForAugmentedAutofill(this); } core/java/android/view/autofill/AutofillManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -691,6 +691,9 @@ public final class AutofillManager { // Indicates whether called the showAutofillDialog() method. private boolean mShowAutofillDialogCalled = false; // Cached autofill feature flag private boolean mShouldIgnoreCredentialViews = false; private final String[] mFillDialogEnabledHints; // Tracked all views that have appeared, including views that there are no Loading Loading @@ -838,6 +841,7 @@ public final class AutofillManager { mIsFillDialogEnabled = AutofillFeatureFlags.isFillDialogEnabled(); mFillDialogEnabledHints = AutofillFeatureFlags.getFillDialogEnabledHints(); mShouldIgnoreCredentialViews = AutofillFeatureFlags.shouldIgnoreCredentialViews(); if (sDebug) { Log.d(TAG, "Fill dialog is enabled:" + mIsFillDialogEnabled + ", hints=" + Arrays.toString(mFillDialogEnabledHints)); Loading Loading @@ -2080,6 +2084,11 @@ public final class AutofillManager { return client != null && client.autofillClientIsFillUiShowing(); } /** @hide */ public boolean shouldIgnoreCredentialViews() { return mShouldIgnoreCredentialViews; } /** @hide */ public void onAuthenticationResult(int authenticationId, Intent data, View focusView) { if (!hasAutofillFeature()) { Loading Loading
core/java/android/view/View.java +11 −7 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ import android.view.accessibility.AccessibilityWindowInfo; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; import android.view.autofill.AutofillFeatureFlags; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; import android.view.autofill.AutofillValue; Loading Loading @@ -10363,15 +10362,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private boolean isAutofillable() { if (getAutofillType() == AUTOFILL_TYPE_NONE) return false; final AutofillManager afm = getAutofillManager(); if (afm == null) { return false; } // Disable triggering autofill if the view is integrated with CredentialManager. if (AutofillFeatureFlags.shouldIgnoreCredentialViews() && isCredential()) return false; if (afm.shouldIgnoreCredentialViews() && isCredential()) { return false; } if (!isImportantForAutofill()) { // If view matches heuristics and is not denied, it will be treated same as view that's // important for autofill if (isMatchingAutofillableHeuristics() && !isActivityDeniedForAutofillForUnimportantView()) { if (afm.isMatchingAutofillableHeuristics(this) && !afm.isActivityDeniedForAutofillForUnimportantView()) { return getAutofillViewId() > LAST_APP_AUTOFILL_ID; } // View is not important for "regular" autofill, so we must check if Augmented Autofill Loading @@ -10380,8 +10385,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (options == null || !options.isAugmentedAutofillEnabled(mContext)) { return false; } final AutofillManager afm = getAutofillManager(); if (afm == null) return false; afm.notifyViewEnteredForAugmentedAutofill(this); }
core/java/android/view/autofill/AutofillManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -691,6 +691,9 @@ public final class AutofillManager { // Indicates whether called the showAutofillDialog() method. private boolean mShowAutofillDialogCalled = false; // Cached autofill feature flag private boolean mShouldIgnoreCredentialViews = false; private final String[] mFillDialogEnabledHints; // Tracked all views that have appeared, including views that there are no Loading Loading @@ -838,6 +841,7 @@ public final class AutofillManager { mIsFillDialogEnabled = AutofillFeatureFlags.isFillDialogEnabled(); mFillDialogEnabledHints = AutofillFeatureFlags.getFillDialogEnabledHints(); mShouldIgnoreCredentialViews = AutofillFeatureFlags.shouldIgnoreCredentialViews(); if (sDebug) { Log.d(TAG, "Fill dialog is enabled:" + mIsFillDialogEnabled + ", hints=" + Arrays.toString(mFillDialogEnabledHints)); Loading Loading @@ -2080,6 +2084,11 @@ public final class AutofillManager { return client != null && client.autofillClientIsFillUiShowing(); } /** @hide */ public boolean shouldIgnoreCredentialViews() { return mShouldIgnoreCredentialViews; } /** @hide */ public void onAuthenticationResult(int authenticationId, Intent data, View focusView) { if (!hasAutofillFeature()) { Loading