incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [9/9] android commit: Proper fix for CB-164. Online/offline events now propagated to webview properly
Date Mon, 23 Apr 2012 21:33:24 GMT
Proper fix for CB-164. Online/offline events now propagated to webview properly


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

Branch: refs/heads/CordovaWebView
Commit: 81059b398f7d739c186f34bdec696885ed31f377
Parents: 31d5a94
Author: Fil Maj <maj.fil@gmail.com>
Authored: Thu Apr 19 16:35:55 2012 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Thu Apr 19 16:35:55 2012 -0700

----------------------------------------------------------------------
 .../src/org/apache/cordova/NetworkManager.java     |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81059b39/framework/src/org/apache/cordova/NetworkManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/NetworkManager.java b/framework/src/org/apache/cordova/NetworkManager.java
index 0fac00f..058757f 100755
--- a/framework/src/org/apache/cordova/NetworkManager.java
+++ b/framework/src/org/apache/cordova/NetworkManager.java
@@ -58,7 +58,7 @@ public class NetworkManager extends Plugin {
     public static final String LTE = "lte";
     public static final String UMB = "umb";
     public static final String HSPA_PLUS = "hspa+";
-    // return types
+    // return type
     public static final String TYPE_UNKNOWN = "unknown";
     public static final String TYPE_ETHERNET = "ethernet";
     public static final String TYPE_WIFI = "wifi";
@@ -123,6 +123,7 @@ public class NetworkManager extends Plugin {
             this.connectionCallbackId = callbackId;
             NetworkInfo info = sockMan.getActiveNetworkInfo();
             PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, this.getConnectionInfo(info));
+            pluginResult.setKeepCallback(true);
             return pluginResult;
         }
         
@@ -195,6 +196,7 @@ public class NetworkManager extends Plugin {
      */
     private void sendUpdate(String type) {
         PluginResult result = new PluginResult(PluginResult.Status.OK, type);
+        result.setKeepCallback(true);
         this.success(result, this.connectionCallbackId);
         
         // Send to all plugins


Mime
View raw message