am f66b0e5f: am c08c5064: Merge "Fix an NPE when running with Keep." into lmp-dev

* commit 'f66b0e5f71be61e496bd8b77f04384ea14b75da7':
  Fix an NPE when running with Keep.
main
Jean Chalard 2014-08-06 17:38:45 +00:00 committed by Android Git Automerger
commit 43cf1ae7bb
1 changed files with 4 additions and 4 deletions

View File

@ -776,15 +776,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
super.onStartInput(editorInfo, restarting);
if (editorInfo == null) {
Log.e(TAG, "Null EditorInfo in onStartInput()");
return;
}
SettingsValues currentSettingsValues = mSettings.getCurrent();
final boolean isSameInputType = currentSettingsValues.isSameInputType(editorInfo);
final boolean hasSameOrientation =
currentSettingsValues.hasSameOrientation(getResources().getConfiguration());
mRichImm.clearSubtypeCaches();
if (editorInfo == null) {
Log.e(TAG, "Null EditorInfo in onStartInput()");
return;
}
final boolean inputTypeChanged = !isSameInputType;
final boolean isDifferentTextField = !restarting || inputTypeChanged;
if (isDifferentTextField || !hasSameOrientation) {