From 65c0f56f8a358929de2e6777d34f037a85451097 Mon Sep 17 00:00:00 2001 From: Haoran Zhang Date: Tue, 2 May 2023 22:01:36 +0000 Subject: Make denylist only apply to unimportant views. Bug: 280462391 Test: atest AutofillForAllAppsTest.java Change-Id: I66130374483b20f9eeab3519aae72e14e0a5eea7 --- core/java/android/view/autofill/AutofillManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java index e39b3a182b28..4b54584d23c1 100644 --- a/core/java/android/view/autofill/AutofillManager.java +++ b/core/java/android/view/autofill/AutofillManager.java @@ -1092,7 +1092,8 @@ public final class AutofillManager { // or if other functions need to call it. if (view.getAutofillType() == View.AUTOFILL_TYPE_NONE) return false; - if (isActivityDeniedForAutofill()) { + // denylist only applies to not important views + if (!view.isImportantForAutofill() && isActivityDeniedForAutofill()) { Log.d(TAG, "view is not autofillable - activity denied for autofill"); return false; } -- cgit v1.2.3-59-g8ed1b