Skip to content

Commit 5e3ccd8

Browse files
author
Hirbod
committed
Update to fix custom icon crashes
1 parent 4b95751 commit 5e3ccd8

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/android/plugin/google/maps/GoogleMaps.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -610,21 +610,14 @@ private void loadPlugin(String serviceName) {
610610
return;
611611
}
612612
try {
613-
Class pluginCls = Class.forName("plugin.google.maps.Plugin" + serviceName);
613+
String className = "plugin.google.maps.Plugin" + serviceName;
614+
Class pluginCls = Class.forName(className);
614615

615616
CordovaPlugin plugin = (CordovaPlugin) pluginCls.newInstance();
616617
PluginEntry pluginEntry = new PluginEntry("GoogleMaps", plugin);
617618
this.plugins.put(serviceName, pluginEntry);
618619

619-
try {
620-
Class cordovaPref = Class.forName("org.apache.cordova.CordovaPreferences");
621-
if (cordovaPref != null) {
622-
Method privateInit = CordovaPlugin.class.getMethod("privateInitialize", CordovaInterface.class, CordovaWebView.class, cordovaPref);
623-
if (privateInit != null) {
624-
privateInit.invoke(plugin, this.cordova, webView, null);
625-
}
626-
}
627-
} catch (Exception e2) {}
620+
plugin.privateInitialize(className, this.cordova, webView, null);
628621

629622
plugin.initialize(this.cordova, webView);
630623
((MyPluginInterface)plugin).setMapCtrl(this);

0 commit comments

Comments
 (0)