Remove code duplication in InputMethodManagerService

This is a groundwork for the subsequent fix. It should not change
existing behavior.

BUG: 15420379
Change-Id: I106b3f50731c799e06b26d1eab9c6a406c06d78c
1 file changed