Fix an NPE when running with Keep.
Change-Id: Ie703e14bff42d34608f11d0c2d7758950b84c88c
This commit is contained in:
parent
9273f3832b
commit
411fa5909b
1 changed files with 4 additions and 4 deletions
|
@ -776,15 +776,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
|
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
|
||||||
super.onStartInput(editorInfo, restarting);
|
super.onStartInput(editorInfo, restarting);
|
||||||
|
if (editorInfo == null) {
|
||||||
|
Log.e(TAG, "Null EditorInfo in onStartInput()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsValues currentSettingsValues = mSettings.getCurrent();
|
SettingsValues currentSettingsValues = mSettings.getCurrent();
|
||||||
final boolean isSameInputType = currentSettingsValues.isSameInputType(editorInfo);
|
final boolean isSameInputType = currentSettingsValues.isSameInputType(editorInfo);
|
||||||
final boolean hasSameOrientation =
|
final boolean hasSameOrientation =
|
||||||
currentSettingsValues.hasSameOrientation(getResources().getConfiguration());
|
currentSettingsValues.hasSameOrientation(getResources().getConfiguration());
|
||||||
mRichImm.clearSubtypeCaches();
|
mRichImm.clearSubtypeCaches();
|
||||||
if (editorInfo == null) {
|
|
||||||
Log.e(TAG, "Null EditorInfo in onStartInput()");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final boolean inputTypeChanged = !isSameInputType;
|
final boolean inputTypeChanged = !isSameInputType;
|
||||||
final boolean isDifferentTextField = !restarting || inputTypeChanged;
|
final boolean isDifferentTextField = !restarting || inputTypeChanged;
|
||||||
if (isDifferentTextField || !hasSameOrientation) {
|
if (isDifferentTextField || !hasSameOrientation) {
|
||||||
|
|
Loading…
Reference in a new issue