(minor) Moved native event handler code into its own file

Change-Id: Iadc4d37ac1501aa42209b382baa04596006fc15c
Merge "(minor) Moved native event handler code into its own file"