updated set and reset current depending on ready state
authordadubrow
Thu, 14 Jan 2010 09:14:16 -0600
changeset 765 beb2e296a8b7
parent 764 603d6ca035e8
child 766 67c35e64c1c9
updated set and reset current depending on ready state
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Thu Jan 14 09:13:44 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Thu Jan 14 09:14:16 2010 -0600
@@ -524,7 +524,11 @@
 	}
 
 	public void setCurrentConnection(IConnection connection) {
-		if (connectionToConnectedServices.keySet().contains(connection)) {
+		if (connection == null) {
+			currentConnection = null; // special case
+			fireCurrentConnectionSet(null);
+		}
+		else if (connectionToConnectedServices.keySet().contains(connection)) {
 			currentConnection = connection;
 			fireCurrentConnectionSet(connection);
 		}