IME toggle (2/2)

Change-Id: I8ff9f6e8915addf9be5d8c6cccd506623d99b920
Fix NPE

Change-Id: I59603e4ef7e9c440000e029427d6ec700888550f