diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/KeyboardSwitcher.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/KeyboardSwitcher.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java index a5a262ec7..dcbdba13d 100644 --- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java @@ -391,18 +391,17 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } public void setShifted(boolean shifted) { - if (mInputView != null) { - LatinKeyboard latinKeyboard = mInputView.getLatinKeyboard(); - if (latinKeyboard != null && latinKeyboard.setShifted(shifted)) { - mInputView.invalidateAllKeys(); - } + if (mInputView == null) return; + LatinKeyboard latinKeyboard = mInputView.getLatinKeyboard(); + if (latinKeyboard == null) return; + if (latinKeyboard.setShifted(shifted)) { + mInputView.invalidateAllKeys(); } } public void setShiftLocked(boolean shiftLocked) { - if (mInputView != null) { - mInputView.setShiftLocked(shiftLocked); - } + if (mInputView == null) return; + mInputView.setShiftLocked(shiftLocked); } public void toggleShift() { |