incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [8/14] android commit: Set the initial network-available state on start-up.
Date Tue, 18 Sep 2012 17:52:51 GMT
Set the initial network-available state on start-up.

I've been assuming that it always starts as true, but this will ensure
that it does.


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/ee34f11c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/ee34f11c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/ee34f11c

Branch: refs/heads/master
Commit: ee34f11c29f60ffdb06667471860806169e2e62f
Parents: 6ca6d88
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Sep 7 09:49:24 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Sep 18 13:24:37 2012 -0400

----------------------------------------------------------------------
 .../org/apache/cordova/NativeToJsMessageQueue.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/ee34f11c/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
index 9ba1562..703baf1 100755
--- a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
+++ b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
@@ -187,8 +187,12 @@ public class NativeToJsMessageQueue {
                 }
             }                
         };
-        
+        OnlineEventsBridgeMode() {
+            webView.setNetworkAvailable(true);
+        }
         public void onNativeToJsMessageAvailable() {
+            // TODO(agrieve): consider running this *not* on the main thread, since it just
+            // sends a message under-the-hood anyways.
             cordova.getActivity().runOnUiThread(runnable);
         }
     }


Mime
View raw message