[CB-164] Changed network plugin to sync from async and removed setKeepCallback(true) on plugin result in there. Fixes location.reload() not firing deviceready due to network plugin being unresponsive

This commit is contained in:
Fil Maj 2012-04-19 12:33:45 -07:00
parent 1e5457a47d
commit 31d5a94ea9

View File

@ -123,7 +123,6 @@ 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;
}
@ -137,8 +136,7 @@ public class NetworkManager extends Plugin {
* @return T=returns value
*/
public boolean isSynch(String action) {
// All methods take a while, so always use async
return false;
return true;
}
/**
@ -197,7 +195,6 @@ 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