From 20723896e12599ef7a5a0e6bee8cd967b410bdbd Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Tue, 3 Feb 2015 16:03:15 -0500 Subject: [PATCH] CB-8411 Initialize plugins only after createViews() is called --- framework/src/org/apache/cordova/CordovaActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index e4ec1b53..684c81b5 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -155,6 +155,7 @@ public class CordovaActivity extends Activity implements CordovaInterface { protected void init() { appView = makeWebView(); createViews(); + appView.init(this, pluginEntries, internalWhitelist, externalWhitelist, preferences); // Wire the hardware volume controls to control media if desired. String volumePref = preferences.getString("DefaultVolumeStream", ""); @@ -222,7 +223,6 @@ public class CordovaActivity extends Activity implements CordovaInterface { Class webViewClass = Class.forName(webViewClassName); Constructor constructor = webViewClass.getConstructor(Context.class); CordovaWebView ret = (CordovaWebView) constructor.newInstance((Context)this); - ret.init(this, pluginEntries, internalWhitelist, externalWhitelist, preferences); return ret; } catch (Exception e) { throw new RuntimeException("Failed to create webview. ", e);