You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/05/08 22:32:13 UTC

[4/5] git commit: [CB-6644][amazon-fireos]Add a check for webview being null in template code Added a check and some comments to guide devs.

[CB-6644][amazon-fireos]Add a check for webview being null in template code
Added a check and some comments to guide devs.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/0ae3c2dc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/0ae3c2dc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/0ae3c2dc

Branch: refs/heads/master
Commit: 0ae3c2dc5ffa84ca8bb881c0144b976886179465
Parents: 3328a1f
Author: Archana Naik <na...@lab126.com>
Authored: Wed May 7 14:53:11 2014 -0700
Committer: Archana Naik <na...@lab126.com>
Committed: Thu May 8 13:30:34 2014 -0700

----------------------------------------------------------------------
 bin/templates/project/Activity.java | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/0ae3c2dc/bin/templates/project/Activity.java
----------------------------------------------------------------------
diff --git a/bin/templates/project/Activity.java b/bin/templates/project/Activity.java
index a515ab0..70f9dc2 100644
--- a/bin/templates/project/Activity.java
+++ b/bin/templates/project/Activity.java
@@ -29,9 +29,17 @@ public class __ACTIVITY__ extends CordovaActivity
     {
         super.onCreate(savedInstanceState);
         super.init();
-        // Set by <content src="index.html" /> in config.xml
-        super.loadUrl(Config.getStartUrl());
-        //super.loadUrl("file:///android_asset/www/index.html");
+        
+        /* Check to make sure Amazon WebView library loaded correctly.
+         * For more information, see the Cordova Amazon Fire OS Platform Guide:
+         * http://cordova.apache.org/docs/en/edge/guide_platforms_amazonfireos_index.md.html
+         */
+        if (this.appView != null) {
+            // Set by <content src="index.html" /> in config.xml
+            super.loadUrl(Config.getStartUrl());
+            //super.loadUrl("file:///android_asset/www/index.html");
+
+        }
     }
 }