cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [5/6] 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.
Date Thu, 08 May 2014 20:44:36 GMT
[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/eaa422fe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/eaa422fe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/eaa422fe

Branch: refs/heads/3.5.x
Commit: eaa422fe007dd35d4cf01883ef238470689d98d3
Parents: 46e70a6
Author: Archana Naik <naika@lab126.com>
Authored: Wed May 7 14:53:11 2014 -0700
Committer: Archana Naik <naika@lab126.com>
Committed: Thu May 8 13:32:58 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/eaa422fe/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");
+
+        }
     }
 }
 


Mime
View raw message