diff options
| author | Adam He <adamhe@google.com> | 2019-10-25 11:58:15 -0700 |
|---|---|---|
| committer | Adam He <adamhe@google.com> | 2020-03-10 10:47:09 -0700 |
| commit | ef0fe2085231dc15e907556f8d930a7393371a9d (patch) | |
| tree | 4698c1290731f32b88d35246facb7dfcf193133f /core/java/android/widget/TextView.java | |
| parent | e42dc4907b98f9b7da60a37c0be796937fdbda89 (diff) | |
Temporary fix to disable augmented autofill requests coming from
password fields.
Bug: 141703197
Test: atest android.autofillservice.cts.augmented
Change-Id: I05330988899a4c21d69c655a39c29fd0fea298c3
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index f3243aaf5b7d..d83970e7117a 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -6607,6 +6607,16 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return mTransformation instanceof PasswordTransformationMethod; } + /** + * Returns true if the current inputType is any type of password. + * + * @hide + */ + public boolean isAnyPasswordInputType() { + final int inputType = getInputType(); + return isPasswordInputType(inputType) || isVisiblePasswordInputType(inputType); + } + static boolean isPasswordInputType(int inputType) { final int variation = inputType & (EditorInfo.TYPE_MASK_CLASS | EditorInfo.TYPE_MASK_VARIATION); |
