This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git
The following commit(s) were added to refs/heads/master by this push:
new b2d9d63 feat: overload PluginEntry constructor to set onload property
(#1166)
b2d9d63 is described below
commit b2d9d639b4a6d5dc31b9d452ff8a3ac5a7126bba
Author: Jakub Blejder <[email protected]>
AuthorDate: Mon Apr 19 08:51:18 2021 +1000
feat: overload PluginEntry constructor to set onload property (#1166)
Co-authored-by: Erisu <[email protected]>
---
framework/src/org/apache/cordova/PluginEntry.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/framework/src/org/apache/cordova/PluginEntry.java
b/framework/src/org/apache/cordova/PluginEntry.java
index c56c453..389cc24 100755
--- a/framework/src/org/apache/cordova/PluginEntry.java
+++ b/framework/src/org/apache/cordova/PluginEntry.java
@@ -47,6 +47,9 @@ public final class PluginEntry {
/**
* Constructs with a CordovaPlugin already instantiated.
+ *
+ * @param service The name of the service
+ * @param pluginClass The plugin class name
*/
public PluginEntry(String service, CordovaPlugin plugin) {
this(service, plugin.getClass().getName(), true, plugin);
@@ -54,6 +57,15 @@ public final class PluginEntry {
/**
* @param service The name of the service
+ * @param plugin The CordovaPlugin already instantiated
+ * @param onload Create plugin object when HTML page is
loaded
+ */
+ public PluginEntry(String service, CordovaPlugin plugin, boolean onload) {
+ this(service, plugin.getClass().getName(), onload, plugin);
+ }
+
+ /**
+ * @param service The name of the service
* @param pluginClass The plugin class name
* @param onload Create plugin object when HTML page is
loaded
*/
@@ -61,6 +73,12 @@ public final class PluginEntry {
this(service, pluginClass, onload, null);
}
+ /**
+ * @param service The name of the service
+ * @param pluginClass The plugin class name
+ * @param onload Create plugin object when HTML page is
loaded
+ * @param plugin The CordovaPlugin already instantiated
+ */
private PluginEntry(String service, String pluginClass, boolean onload,
CordovaPlugin plugin) {
this.service = service;
this.pluginClass = pluginClass;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]