Slightly improved android input handling.