IME is called back four methods for each input field as a IME life
cycle. The four methods are onStartInput, onStartInputView,
onFinishInputView and onFinishInput.
After orientation changed, Those quartet methods will be called back
twice. This behavior of the framework might be a bug.
In order to restore the previous keyboard layout, we should skip
onFinishInputView and onFinishInput of the first quartet and
onStartInput and onStartInputView of the second quartet.
Bug: 4311428
Change-Id: I450ddc0cce5d00abc971ffd42a507a8a86682548