Fix potential NPE
Change-Id: I3679d24b6c89e081d24d59c91b136c139dcb3d5c
This commit is contained in:
parent
d85bc7221c
commit
3be0039164
1 changed files with 3 additions and 2 deletions
|
@ -546,8 +546,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
// know now whether this is a password text field, because we need to know now whether we
|
// know now whether this is a password text field, because we need to know now whether we
|
||||||
// want to enable the voice button.
|
// want to enable the voice button.
|
||||||
final VoiceProxy voiceIme = mVoiceProxy;
|
final VoiceProxy voiceIme = mVoiceProxy;
|
||||||
voiceIme.resetVoiceStates(InputTypeCompatUtils.isPasswordInputType(attribute.inputType)
|
final int inputType = (attribute != null) ? attribute.inputType : 0;
|
||||||
|| InputTypeCompatUtils.isVisiblePasswordInputType(attribute.inputType));
|
voiceIme.resetVoiceStates(InputTypeCompatUtils.isPasswordInputType(inputType)
|
||||||
|
|| InputTypeCompatUtils.isVisiblePasswordInputType(inputType));
|
||||||
|
|
||||||
initializeInputAttributes(attribute);
|
initializeInputAttributes(attribute);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue