incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [38/50] [abbrv] js commit: [android] Use constants for bridge modes in place of literals.
Date Fri, 24 Aug 2012 21:57:39 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/e4728510
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/e4728510
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/e4728510

Branch: refs/heads/master
Commit: e472851065f5cb1a42741b749eb860d9d83d80f1
Parents: 28b38f8
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Aug 21 11:46:20 2012 -0400
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Fri Aug 24 13:49:59 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/e4728510/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