Merge changes I154b0606,Ib7c6533f into main

* changes:
  Use ScopedLocalRef in InputEvent jni function
  Refactor android_view_MotionEvent_obtainAsCopyFromNative implementation