cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] android commit: Remove PluginManager.exec's return value (unused).
Date Fri, 21 Jun 2013 02:22:13 GMT
Remove PluginManager.exec's return value (unused).

It's not only not used, but when it was used was messing up the
DISABLE_EXEC_CHAINING flag.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/9946d15f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/9946d15f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/9946d15f

Branch: refs/heads/master
Commit: 9946d15f2348b8f6a23e589c8916a9410aa4b3da
Parents: b032dcc
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jun 20 22:20:58 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jun 20 22:20:58 2013 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/ExposedJsApi.java      |  4 ++--
 framework/src/org/apache/cordova/api/PluginManager.java | 12 ++++--------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9946d15f/framework/src/org/apache/cordova/ExposedJsApi.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/ExposedJsApi.java b/framework/src/org/apache/cordova/ExposedJsApi.java
index 7702d35..40ab1e3 100755
--- a/framework/src/org/apache/cordova/ExposedJsApi.java
+++ b/framework/src/org/apache/cordova/ExposedJsApi.java
@@ -48,9 +48,9 @@ import org.json.JSONException;
 
         jsMessageQueue.setPaused(true);
         try {
-            boolean wasSync = pluginManager.exec(service, action, callbackId, arguments);
+            pluginManager.exec(service, action, callbackId, arguments);
             String ret = "";
-            if (!NativeToJsMessageQueue.DISABLE_EXEC_CHAINING || wasSync) {
+            if (!NativeToJsMessageQueue.DISABLE_EXEC_CHAINING) {
                 ret = jsMessageQueue.popAndEncode();
             }
             return ret;

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9946d15f/framework/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginManager.java b/framework/src/org/apache/cordova/api/PluginManager.java
index a819107..adaec90 100755
--- a/framework/src/org/apache/cordova/api/PluginManager.java
+++ b/framework/src/org/apache/cordova/api/PluginManager.java
@@ -200,15 +200,14 @@ public class PluginManager {
      *                      this is an async plugin call.
      * @param rawArgs       An Array literal string containing any arguments needed in the
      *                      plugin execute method.
-     * @return Whether the task completed synchronously.
      */
-    public boolean exec(String service, String action, String callbackId, String rawArgs)
{
+    public void exec(String service, String action, String callbackId, String rawArgs) {
         CordovaPlugin plugin = this.getPlugin(service);
         if (plugin == null) {
             Log.d(TAG, "exec() call to unknown plugin: " + service);
             PluginResult cr = new PluginResult(PluginResult.Status.CLASS_NOT_FOUND_EXCEPTION);
             app.sendPluginResult(cr, callbackId);
-            return true;
+            return;
         }
         try {
             CallbackContext callbackContext = new CallbackContext(callbackId, app);
@@ -216,19 +215,16 @@ public class PluginManager {
             if (!wasValidAction) {
                 PluginResult cr = new PluginResult(PluginResult.Status.INVALID_ACTION);
                 app.sendPluginResult(cr, callbackId);
-                return true;
             }
-            return callbackContext.isFinished();
         } catch (JSONException e) {
             PluginResult cr = new PluginResult(PluginResult.Status.JSON_EXCEPTION);
             app.sendPluginResult(cr, callbackId);
-            return true;
         }
     }
 
     @Deprecated
-    public boolean exec(String service, String action, String callbackId, String jsonArgs,
boolean async) {
-        return exec(service, action, callbackId, jsonArgs);
+    public void exec(String service, String action, String callbackId, String jsonArgs, boolean
async) {
+        exec(service, action, callbackId, jsonArgs);
     }
 
     /**


Mime
View raw message