incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/4] js commit: [android] Use constants for bridge modes in place of literals.
Date Wed, 22 Aug 2012 13:42:02 GMT
[android] Use constants for bridge modes in place of literals.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/8e03c225
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/8e03c225
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/8e03c225

Branch: refs/heads/master
Commit: 8e03c2257827d9f9b14e771a2f829db566719db9
Parents: 93c7c2d
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Aug 21 11:46:20 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Aug 22 09:41:12 2012 -0400

----------------------------------------------------------------------
 lib/android/exec.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/8e03c225/lib/android/exec.js
----------------------------------------------------------------------
diff --git a/lib/android/exec.js b/lib/android/exec.js
index 4c817f4..43bcd5f 100644
--- a/lib/android/exec.js
+++ b/lib/android/exec.js
@@ -120,17 +120,17 @@ androidExec.setNativeToJsBridgeMode = function(mode) {
     if (mode == nativeToJsBridgeMode) {
         return;
     }
-    if (nativeToJsBridgeMode == 0) {
+    if (nativeToJsBridgeMode == nativeToJsModes.POLLING) {
         polling.stop();
-    } else if (nativeToJsBridgeMode == 1) {
+    } else if (nativeToJsBridgeMode == nativeToJsModes.HANGING_GET) {
         callback.stop();
     }
     nativeToJsBridgeMode = mode;
     // Tell the native side to switch modes.
     prompt(mode, "gap_bridge_mode:");
-    if (mode == 0) {
+    if (mode == nativeToJsModes.POLLING) {
         polling.start();
-    } else if (mode == 1) {
+    } else if (mode == nativeToJsModes.HANGING_GET) {
         callback.start();
     }
 };


Mime
View raw message