commit before changing the input listeners
added support for newer versions of android