Fix issue #3392073: At times soft keyboard comes up in...

...gallery while attaching picture to gmail message

In various places we could block switching the IME target incorrectly.

Change-Id: I7e647fb35f4ea6f2e39eb7efd911420ea9ee64fa
2 files changed