Fix NPE
Bug: 5120674 Change-Id: Iedfd7af33a96b68d83d9a844f61ac40b9523ecdb
This commit is contained in:
parent
3234123fba
commit
94ac3d760b
1 changed files with 4 additions and 1 deletions
|
@ -187,13 +187,16 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
|||
}
|
||||
|
||||
public void save() {
|
||||
if (mCurrentId == null) {
|
||||
return;
|
||||
}
|
||||
mIsAlphabetMode = isAlphabetMode();
|
||||
if (mIsAlphabetMode) {
|
||||
mIsShiftLocked = isShiftLocked();
|
||||
mIsShifted = !mIsShiftLocked && isShiftedOrShiftLocked();
|
||||
} else {
|
||||
mIsShiftLocked = false;
|
||||
mIsShifted = mSymbolsShiftedKeyboardId.equals(mCurrentId);
|
||||
mIsShifted = mCurrentId.equals(mSymbolsShiftedKeyboardId);
|
||||
}
|
||||
mIsValid = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue