summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextView.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-03-11 21:43:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-11 21:43:58 +0000
commitf5589a71e06e85189f2ee0b235e932da37c24732 (patch)
treef72ecd746341054d63c9e15c26ef72b7857e24ac /core/java/android/widget/TextView.java
parent5a563d287074fac4b3375380eb67fa09b53a4604 (diff)
parentef0fe2085231dc15e907556f8d930a7393371a9d (diff)
Merge "Temporary fix to disable augmented autofill requests coming from password fields." into rvc-dev
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r--core/java/android/widget/TextView.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 0d820654377c..2168018e12be 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);