Merge "Fix regression of View visibleChanges times" into udc-dev am: 01f114e10d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21751082 Change-Id: I7a80920921dd47a9ab11593e633d716e1394f198 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -142,7 +142,6 @@ import android.view.accessibility.AccessibilityWindowInfo;
|
|||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.view.animation.Transformation;
|
import android.view.animation.Transformation;
|
||||||
import android.view.autofill.AutofillFeatureFlags;
|
|
||||||
import android.view.autofill.AutofillId;
|
import android.view.autofill.AutofillId;
|
||||||
import android.view.autofill.AutofillManager;
|
import android.view.autofill.AutofillManager;
|
||||||
import android.view.autofill.AutofillValue;
|
import android.view.autofill.AutofillValue;
|
||||||
@@ -10363,15 +10362,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
private boolean isAutofillable() {
|
private boolean isAutofillable() {
|
||||||
if (getAutofillType() == AUTOFILL_TYPE_NONE) return false;
|
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.
|
// Disable triggering autofill if the view is integrated with CredentialManager.
|
||||||
if (AutofillFeatureFlags.shouldIgnoreCredentialViews()
|
if (afm.shouldIgnoreCredentialViews() && isCredential()) {
|
||||||
&& isCredential()) return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isImportantForAutofill()) {
|
if (!isImportantForAutofill()) {
|
||||||
// If view matches heuristics and is not denied, it will be treated same as view that's
|
// If view matches heuristics and is not denied, it will be treated same as view that's
|
||||||
// important for autofill
|
// important for autofill
|
||||||
if (isMatchingAutofillableHeuristics()
|
if (afm.isMatchingAutofillableHeuristics(this)
|
||||||
&& !isActivityDeniedForAutofillForUnimportantView()) {
|
&& !afm.isActivityDeniedForAutofillForUnimportantView()) {
|
||||||
return getAutofillViewId() > LAST_APP_AUTOFILL_ID;
|
return getAutofillViewId() > LAST_APP_AUTOFILL_ID;
|
||||||
}
|
}
|
||||||
// View is not important for "regular" autofill, so we must check if Augmented Autofill
|
// View is not important for "regular" autofill, so we must check if Augmented Autofill
|
||||||
@@ -10380,8 +10385,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
if (options == null || !options.isAugmentedAutofillEnabled(mContext)) {
|
if (options == null || !options.isAugmentedAutofillEnabled(mContext)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final AutofillManager afm = getAutofillManager();
|
|
||||||
if (afm == null) return false;
|
|
||||||
afm.notifyViewEnteredForAugmentedAutofill(this);
|
afm.notifyViewEnteredForAugmentedAutofill(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -691,6 +691,9 @@ public final class AutofillManager {
|
|||||||
// Indicates whether called the showAutofillDialog() method.
|
// Indicates whether called the showAutofillDialog() method.
|
||||||
private boolean mShowAutofillDialogCalled = false;
|
private boolean mShowAutofillDialogCalled = false;
|
||||||
|
|
||||||
|
// Cached autofill feature flag
|
||||||
|
private boolean mShouldIgnoreCredentialViews = false;
|
||||||
|
|
||||||
private final String[] mFillDialogEnabledHints;
|
private final String[] mFillDialogEnabledHints;
|
||||||
|
|
||||||
// Tracked all views that have appeared, including views that there are no
|
// Tracked all views that have appeared, including views that there are no
|
||||||
@@ -838,6 +841,7 @@ public final class AutofillManager {
|
|||||||
|
|
||||||
mIsFillDialogEnabled = AutofillFeatureFlags.isFillDialogEnabled();
|
mIsFillDialogEnabled = AutofillFeatureFlags.isFillDialogEnabled();
|
||||||
mFillDialogEnabledHints = AutofillFeatureFlags.getFillDialogEnabledHints();
|
mFillDialogEnabledHints = AutofillFeatureFlags.getFillDialogEnabledHints();
|
||||||
|
mShouldIgnoreCredentialViews = AutofillFeatureFlags.shouldIgnoreCredentialViews();
|
||||||
if (sDebug) {
|
if (sDebug) {
|
||||||
Log.d(TAG, "Fill dialog is enabled:" + mIsFillDialogEnabled
|
Log.d(TAG, "Fill dialog is enabled:" + mIsFillDialogEnabled
|
||||||
+ ", hints=" + Arrays.toString(mFillDialogEnabledHints));
|
+ ", hints=" + Arrays.toString(mFillDialogEnabledHints));
|
||||||
@@ -2080,6 +2084,11 @@ public final class AutofillManager {
|
|||||||
return client != null && client.autofillClientIsFillUiShowing();
|
return client != null && client.autofillClientIsFillUiShowing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public boolean shouldIgnoreCredentialViews() {
|
||||||
|
return mShouldIgnoreCredentialViews;
|
||||||
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void onAuthenticationResult(int authenticationId, Intent data, View focusView) {
|
public void onAuthenticationResult(int authenticationId, Intent data, View focusView) {
|
||||||
if (!hasAutofillFeature()) {
|
if (!hasAutofillFeature()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user