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/01/03 19:57:10 UTC

[36/50] git commit: Fix Issue #23 - Crash when using splash screen.

Fix Issue #23 - Crash when using splash screen.


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/cbdd400f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/cbdd400f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/cbdd400f

Branch: refs/heads/master
Commit: cbdd400fe7bc97152c2f1da144f7cf368a5abf9c
Parents: a6db111
Author: Bryce Curtis <cu...@gmail.com>
Authored: Tue Nov 15 23:13:49 2011 -0600
Committer: Bryce Curtis <cu...@gmail.com>
Committed: Tue Nov 15 23:13:49 2011 -0600

----------------------------------------------------------------------
 framework/src/com/phonegap/DroidGap.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/cbdd400f/framework/src/com/phonegap/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java
index dbc9f40..0826c50 100755
--- a/framework/src/com/phonegap/DroidGap.java
+++ b/framework/src/com/phonegap/DroidGap.java
@@ -375,12 +375,7 @@ public class DroidGap extends PhonegapActivity {
         if (!url.startsWith("javascript:")) {
             LOG.d(TAG, "DroidGap.loadUrl(%s)", url);
         }
-        
-        // Init web view if not already done
-        if (this.appView == null) {
-            this.init();
-        }
-               
+
         this.url = url;
         if (this.baseUrl == null) {
             int i = url.lastIndexOf('/');
@@ -400,6 +395,11 @@ public class DroidGap extends PhonegapActivity {
         this.runOnUiThread(new Runnable() {
             public void run() {
 
+                // Init web view if not already done
+                if (me.appView == null) {
+                    me.init();
+                }
+
                 // Handle activity parameters
                 me.handleActivityParameters();
 
@@ -520,6 +520,9 @@ public class DroidGap extends PhonegapActivity {
         // Handle activity parameters
         this.runOnUiThread(new Runnable() {
             public void run() {
+                if (me.appView == null) {
+                    me.init();
+                }
                 me.handleActivityParameters();
             }
         });