mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
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.
(cherry picked from commit 9946d15f23
)
This commit is contained in:
parent
e726c0d60b
commit
f78b444ed1
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user