Fix exit from unicode mode

Retrieve set input method at beginning, and reset to that at end. Only do reset conditionally.
It depends on the device. On an emulator using the hardware keyboard, they used to be able to type English, now they'll be able to type whatever their keyboard can produce.

On an emulator with a software keyboard, or on a real device, they will have no keyboard and won't be able to input anything.