Merge "Revert "Fix potential failures in InputMethodService""