- /**
- * Passdown key-up event to the runtime view.
- * Usually meet the case of clicking on the back key.
- */
- public boolean onKeyUp(int keyCode, KeyEvent event) {
- // Normally, java can handle the convertion of boolean and Boolean well,
- // But here invokeMethod is possible to return null if runtime lib not found,
- // Convert null to boolean will cause NullPointerException.
- Boolean handled = (Boolean) invokeMethod(mOnKeyUp, mInstance, keyCode, event);
- if (handled != null) return handled;
- return false;
- }
-