summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author mrulhania <mrulhania@google.com> 2024-04-09 12:30:11 -0700
committer mrulhania <mrulhania@google.com> 2024-04-09 12:30:11 -0700
commita2385100f808081c5c13447ac3d5f6cb80c86284 (patch)
tree3ac181c79b2894b4904641ea94372ab04d816958
parent16769d7f9e531022e28085bce68aef089069fc32 (diff)
Add credit cards and credential hint to the heuristic
The heuristic now will consider additional autofill hints to determine if a view is sensitive or not, sensitive views are blocked during screen share to protect user privacy. Not adding additional tests, as writing a test for each autofill hint feels unnecessary. Test: atest CtsSensitiveContentProtectionTestCases Test: manual Fix: 332776415 Change-Id: Ifc106888de3c73f1ed955cf8878b0039e4c079e8
-rw-r--r--core/java/android/view/View.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index eb7de93b83f3..75874adb771e 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -32809,6 +32809,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_USERNAME);
SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_PASSWORD_AUTO);
SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_PASSWORD);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_NUMBER);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR);
+ SENSITIVE_CONTENT_AUTOFILL_HINTS.add(View.AUTOFILL_HINT_CREDENTIAL_MANAGER);
}
/**