am 17dc363a: Fix an NPE found in KeyboardSwitcher.isAlphabetMode()
Merge commit '17dc363a63a20d18cd8161f917899b39aed6ddd6' into gingerbread-plus-aosp * commit '17dc363a63a20d18cd8161f917899b39aed6ddd6': Fix an NPE found in KeyboardSwitcher.isAlphabetMode()main
commit
3ecb4813f1
|
@ -335,6 +335,9 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
|||
}
|
||||
|
||||
boolean isAlphabetMode() {
|
||||
if (mCurrentId == null) {
|
||||
return false;
|
||||
}
|
||||
int currentMode = mCurrentId.mKeyboardMode;
|
||||
for (Integer mode : ALPHABET_MODES) {
|
||||
if (currentMode == mode) {
|
||||
|
|
|
@ -968,7 +968,7 @@ public class LatinIME extends InputMethodService
|
|||
|
||||
public void updateShiftKeyState(EditorInfo attr) {
|
||||
InputConnection ic = getCurrentInputConnection();
|
||||
if (attr != null && mKeyboardSwitcher.isAlphabetMode() && ic != null) {
|
||||
if (ic != null && attr != null && mKeyboardSwitcher.isAlphabetMode()) {
|
||||
mKeyboardSwitcher.setShifted(mCapsLock || getCursorCapsMode(ic, attr) != 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue