Fix default bridge mode being PRIVATE_API (should be ONLINE_EVENTS).

This was broken when HANGING_GET mode was removed.
This commit is contained in:
Andrew Grieve
2012-10-02 09:40:16 -04:00
parent 467cbe972c
commit 6f873ff6b5
2 changed files with 33 additions and 17 deletions
@@ -36,7 +36,7 @@ public class NativeToJsMessageQueue {
private static final String LOG_TAG = "JsMessageQueue";
// This must match the default value in incubator-cordova-js/lib/android/exec.js
private static final int DEFAULT_BRIDGE_MODE = 3;
private static final int DEFAULT_BRIDGE_MODE = 2;
// Set this to true to force plugin results to be encoding as
// JS instead of the custom format (useful for benchmarking).
@@ -367,10 +367,16 @@ public class NativeToJsMessageQueue {
final String jsPayloadOrCallbackId;
final PluginResult pluginResult;
JsMessage(String js) {
if (js == null) {
throw new NullPointerException();
}
jsPayloadOrCallbackId = js;
pluginResult = null;
}
JsMessage(PluginResult pluginResult, String callbackId) {
if (callbackId == null || pluginResult == null) {
throw new NullPointerException();
}
jsPayloadOrCallbackId = callbackId;
this.pluginResult = pluginResult;
}