You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/03/15 22:29:46 UTC

android commit: Checking for the callback server before we call sendJavascript for the Kindle Fire, CB-247

Updated Branches:
  refs/heads/master 692a59a69 -> dc93556ef


Checking for the callback server before we call sendJavascript for the Kindle Fire, CB-247


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/dc93556e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/dc93556e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/dc93556e

Branch: refs/heads/master
Commit: dc93556ef07e4ec745ca6d3ed64093f81fa47967
Parents: 692a59a
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Mar 15 14:29:25 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Mar 15 14:29:25 2012 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/DroidGap.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/dc93556e/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 8513eea..4cbdcc2 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -952,7 +952,9 @@ public class DroidGap extends Activity implements CordovaInterface {
      * @param message
      */
     public void sendJavascript(String statement) {
-        this.callbackServer.sendJavascript(statement);
+        //We need to check for the null case on the Kindle Fire beacuse it changes the width and height on load
+        if(this.callbackServer != null)
+          this.callbackServer.sendJavascript(statement);
     }
 
     /**