Ensure batch edit mode is ended on window focus loss

This is a translation of this open source contribution:
https://android-review.googlesource.com/38503

Change-Id: I4d3adf89d0752e6fd5ec2cdad3a54d4e764a1fe7
1 file changed