diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 9df68cd6..8513eea6 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -1068,7 +1068,7 @@ public class DroidGap extends Activity implements CordovaInterface { // If back key is bound, then send event to JavaScript if (this.bound) { - this.appView.loadUrl("javascript:cordova.require('cordova').fireDocumentEvent('backbutton');"); + this.appView.loadUrl("javascript:cordova.fireDocumentEvent('backbutton');"); return true; } @@ -1090,13 +1090,13 @@ public class DroidGap extends Activity implements CordovaInterface { // If menu key else if (keyCode == KeyEvent.KEYCODE_MENU) { - this.appView.loadUrl("javascript:cordova.require('cordova').fireDocumentEvent('menubutton');"); + this.appView.loadUrl("javascript:cordova.fireDocumentEvent('menubutton');"); return super.onKeyDown(keyCode, event); } // If search key else if (keyCode == KeyEvent.KEYCODE_SEARCH) { - this.appView.loadUrl("javascript:cordova.require('cordova').fireDocumentEvent('searchbutton');"); + this.appView.loadUrl("javascript:cordova.fireDocumentEvent('searchbutton');"); return true; } diff --git a/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java b/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java index 6a18c9aa..a024b23b 100755 --- a/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java +++ b/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java @@ -87,13 +87,13 @@ public class LinearLayoutSoftKeyboardDetect extends LinearLayout { // gone away. else if (height > oldHeight) { if(app != null) - app.sendJavascript("cordova.require('cordova').fireDocumentEvent('hidekeyboard');"); + app.sendJavascript("cordova.fireDocumentEvent('hidekeyboard');"); } // If the height as gotten smaller then we will assume the soft keyboard has // been displayed. else if (height < oldHeight) { if(app != null) - app.sendJavascript("cordova.require('cordova').fireDocumentEvent('showkeyboard');"); + app.sendJavascript("cordova.fireDocumentEvent('showkeyboard');"); } // Update the old height for the next event diff --git a/framework/src/org/apache/cordova/api/PluginResult.java b/framework/src/org/apache/cordova/api/PluginResult.java index 35c91ec9..c3ef6d6a 100755 --- a/framework/src/org/apache/cordova/api/PluginResult.java +++ b/framework/src/org/apache/cordova/api/PluginResult.java @@ -84,11 +84,11 @@ public class PluginResult { } public String toSuccessCallbackString(String callbackId) { - return "cordova.require('cordova').callbackSuccess('"+callbackId+"',"+this.getJSONString()+");"; + return "cordova.callbackSuccess('"+callbackId+"',"+this.getJSONString()+");"; } public String toErrorCallbackString(String callbackId) { - return "cordova.require('cordova').callbackError('"+callbackId+"', " + this.getJSONString()+ ");"; + return "cordova.callbackError('"+callbackId+"', " + this.getJSONString()+ ");"; } public static String[] StatusMessages = new String[] {