Upstream version 8.36.161.0
[platform/framework/web/crosswalk.git] / src / xwalk / app / android / runtime_client / src / org / xwalk / app / runtime / XWalkRuntimeClient.java
index f5d6861..950c89e 100644 (file)
@@ -8,7 +8,6 @@ import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.util.AttributeSet;
-import android.view.KeyEvent;
 import android.view.View;
 import android.widget.FrameLayout;
 
@@ -37,7 +36,6 @@ public class XWalkRuntimeClient extends CrossPackageWrapper {
     private Method mOnNewIntent;
     private Method mEnableRemoteDebugging;
     private Method mDisableRemoteDebugging;
-    private Method mOnKeyUp;
 
     // For instrumentation test.
     private Method mGetTitleForTest;
@@ -67,7 +65,6 @@ public class XWalkRuntimeClient extends CrossPackageWrapper {
         mOnNewIntent = lookupMethod("onNewIntent", Intent.class);
         mEnableRemoteDebugging = lookupMethod("enableRemoteDebugging", String.class, String.class);
         mDisableRemoteDebugging = lookupMethod("disableRemoteDebugging");
-        mOnKeyUp = lookupMethod("onKeyUp", int.class, KeyEvent.class);
     }
 
     /**
@@ -245,19 +242,6 @@ public class XWalkRuntimeClient extends CrossPackageWrapper {
         invokeMethod(mDisableRemoteDebugging, mInstance);
     }
 
-    /**
-     * 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;
-    }
-
     // The following functions just for instrumentation test.
     public View getViewForTest() {
         return (View)mInstance;