Merge "Rewrite input handling for native applications" into jb-mr2-dev