diff options
author | 2011-11-21 14:58:32 -0800 | |
---|---|---|
committer | 2011-11-21 16:32:46 -0800 | |
commit | e7eac906c0a14b644d457beeb73a407fa1b63673 (patch) | |
tree | 7f58e6e5f1e8363928e750bd5790729c720df9cf /java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java | |
parent | 19cbdfc92f171375b73204f0c49d9f84883bea39 (diff) | |
download | latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.tar.gz latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.tar.xz latinime-e7eac906c0a14b644d457beeb73a407fa1b63673.zip |
Pending onStartInputView only if the EditorInfo is identical
Bug: 5604372
Change-Id: I2a88cf15b07eebd29e43e460f6ec758432181b01
Diffstat (limited to 'java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java index 4a2542dec..dcebb1c04 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java @@ -116,8 +116,8 @@ public class AccessibilityUtils { * @return {@code true} if the device should not speak text (eg. * non-control) characters */ - public boolean shouldObscureInput(EditorInfo attribute) { - if (attribute == null) + public boolean shouldObscureInput(EditorInfo editorInfo) { + if (editorInfo == null) return false; // Always speak if the user is listening through headphones. @@ -125,7 +125,7 @@ public class AccessibilityUtils { return false; // Don't speak if the IME is connected to a password field. - return InputTypeCompatUtils.isPasswordInputType(attribute.inputType); + return InputTypeCompatUtils.isPasswordInputType(editorInfo.inputType); } /** @@ -159,11 +159,11 @@ public class AccessibilityUtils { * Handles speaking the "connect a headset to hear passwords" notification * when connecting to a password field. * - * @param attribute The input connection's editor info attribute. + * @param editorInfo The input connection's editor info attribute. * @param restarting Whether the connection is being restarted. */ - public void onStartInputViewInternal(EditorInfo attribute, boolean restarting) { - if (shouldObscureInput(attribute)) { + public void onStartInputViewInternal(EditorInfo editorInfo, boolean restarting) { + if (shouldObscureInput(editorInfo)) { final CharSequence text = mContext.getText(R.string.spoken_use_headphones); speak(text); } |